wolfgangbrandl / db2_fdw

PostgreSQL DB2 Data Wrapper
Other
21 stars 13 forks source link

Query to foreign table fails with SQL ERROR [HV00N] "The use of the the reserved word "Isoalation" following "" is not valid #14

Open duane-l opened 5 years ago

duane-l commented 5 years ago

Hi Wolfgang,

We have setup db2_fdw on our Postgres 10.4 server (Linux x86_64) using a 11.1 version of the DB2 client.

In this case we are connecting to DB2 Z/OS (not LUW) and we were able to create the foreign server and foreign table without issue.

However, when attempting to query the foreign table SQLCODE -199 is received in DB2 with the following:

error

It seems that the foreign data wrapper is attempting to execute SET CURRENT ISOLATION SERIALIZABLE, a statement that (from what I can tell) appears only to be valid for DB2 LUW: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0010944.html

Is there an option or method to address this for a target on Z/OS?

Thanks in advance!

wolfgangbrandl commented 5 years ago

Hi

Can you send me the create table statement of the requested table?

Thanks

duane-l notifications@github.com hat am 3. Mai 2019 um 17:38 geschrieben:

Hi Wolfgang,

We have setup db2_fdw on our Postgres 10.4 server (Linux x86_64) using a 11.1 version of the DB2 client.

In this case we are connecting to DB2 Z/OS (not LUW) and we were able to create the foreign server and foreign table without issue.

However, when attempting to query the foreign table SQLCODE -199 is received in DB2 with the following:

[error] https://user-images.githubusercontent.com/37001084/57148451-9f343980-6d97-11e9-83aa-0aa6136e452d.PNG

It seems that the foreign data wrapper is attempting to execute SET CURRENT ISOLATION SERIALIZABLE, a statement that (from what I can tell) appears only to be valid for DB2 LUW: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0010944.html

Is there an option or method to address this for a target on Z/OS?

Thanks in advance!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/wolfgangbrandl/db2_fdw/issues/14 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACMUXO7M6DIHIMSRYVM7BNLPTRL5TANCNFSM4HKU6LDQ .

mfg.

Ing. Wolfgang Brandl

Mobil: +43 660 7132911

Einarhlr commented 4 years ago

Hi! I have this same problem, but when running import schema in postgresql 12 on Centos to DB2 on IBM Power Systems running IBM i version 7. Help Please

IMPORT FOREIGN SCHEMA "ADMINDTA" FROM SERVER co INTO public;

ERROR: error connecting to DB2: OCITransStart failed to start a transaction DETAIL: SQLSTATE = 42601 SQLCODE = -104 line=605 file=db2_utils.c [IBM][OCI Driver][AS] SQL0104N An unexpected token "ISOLATION" was found following "". Expected tokens may include: "DEGREE". SQLSTATE=42601

wolfgangbrandl commented 4 years ago

Hi,

Which version of postgres,db2 and db2_fdw are you using?

Einarhlr notifications@github.com hat am 25. Juni 2020 um 22:23 geschrieben:

I have this same problem from postgresql 12 to db2 in ibm serie i

IMPORT FOREIGN SCHEMA "ADMINDTA" FROM SERVER co INTO public;

ERROR: error connecting to DB2: OCITransStart failed to start a transaction
DETAIL: SQLSTATE = 42601 SQLCODE = -104
line=605
file=db2_utils.c
[IBM][OCI Driver][AS] SQL0104N An unexpected token "ISOLATION" was found following "". Expected tokens may include: "DEGREE". SQLSTATE=42601

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/wolfgangbrandl/db2_fdw/issues/14#issuecomment-649798522 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMUXO2JNBMFHBZP7FL2N4TRYOW55ANCNFSM4HKU6LDQ .

mfg.

Ing. Wolfgang Brandl

Mobil: +43 660 7132911