Re: [GENERAL] Accessing DB2 tables from postgresql
От | Achilleas Mantzios |
---|---|
Тема | Re: [GENERAL] Accessing DB2 tables from postgresql |
Дата | |
Msg-id | 863049c0-31ad-4100-74d7-46f47f62e846@matrix.gatewaynet.com обсуждение исходный текст |
Ответ на | [GENERAL] Accessing DB2 tables from postgresql (Swapnil Vaze <swapvaze28@gmail.com>) |
Список | pgsql-general |
On 27/06/2017 13:11, 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 '<username>', odbc_PWD '<password>');$ 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' );
You have omitted the CREATE SERVER command. Can you query the mainframe using isql ?
All commands work fine, however when I try to select data from table it throws error:$ select * from odbc_table;ERROR: Executing ODBC queryCan anyone help me here?How can I access DB2 LUW or zOS database tables from postgres?
I used to work with MVS many years ago. Good luck with your project.
For better diagnosis open all logs in both machines (postgresql, odbc, MVS, DB2) and have a detailed view on them.
--Thanks & Regards,Swapnil Vaze
-- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt
В списке pgsql-general по дате отправления: