Re: [GENERAL] Accessing DB2 tables from postgresql
От
Adrian Klaver
Тема
Re: [GENERAL] Accessing DB2 tables from postgresql
Дата
Msg-id
906863bb-3b88-4748-23e0-4b552acc387e@aklaver.com
Ответ на
[GENERAL] Accessing DB2 tables from postgresql (Swapnil Vaze)
Список
Дерево обсуждения
[GENERAL] Accessing DB2 tables from postgresql Swapnil Vaze <swapvaze28@gmail.com>
Re: [GENERAL] Accessing DB2 tables from postgresql Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: [GENERAL] Accessing DB2 tables from postgresql Adrian Klaver <adrian.klaver@aklaver.com>
Re: [GENERAL] Accessing DB2 tables from postgresql Swapnil Vaze <swapvaze28@gmail.com>
Re: [GENERAL] Accessing DB2 tables from postgresql Adrian Klaver <adrian.klaver@aklaver.com>
Re: [GENERAL] Accessing DB2 tables from postgresql Swapnil Vaze <swapvaze28@gmail.com>
On 06/27/2017 03:11 AM, Swapnil Vaze wrote: > Hello, > > I am trying to access few table present in DB2 LUW from postgres9.5 > database. > > I have installed unixODBC driver and connection to DB2 is working fine. > I have installed CartoDB/odbc_fdw foreign data wrappers. > I have user below commands to create foreign table: > $ create extension odbc_fdw; > $ CREATE USER MAPPING FOR postgres SERVER odbc_server_db2 > options(odbc_UID '', odbc_PWD ''); > $ CREATE FOREIGN TABLE odbc_table (CTGRY_ID INTEGER, CTGRY_CD > VARCHAR(10),UPDT_TS TIMESTAMP) SERVER odbc_server_db2 OPTIONS (database > 'TESTV9', schema 'schema1', table 'table1' ); > > All commands work fine, however when I try to select data from table it > throws error: > $ select * from odbc_table; > ERROR: Executing ODBC query > > Can anyone help me here? Might want to take a look at: https://github.com/CartoDB/odbc_fdw From the examples above you need to prefix some settings with odbc_. In your example that would be odbc_database 'TESTV9' instead of database 'TESTV9'. > How can I access DB2 LUW or zOS database tables from postgres? > > -- > Thanks & Regards, > Swapnil Vaze -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления
От: rajan
Дата: