Getting query result different on Windows and Linux for database DB2i

30 views
Skip to first unread message

Siddhesh Naik

unread,
Jul 16, 2019, 8:26:21 AM7/16/19
to ibm_db
Hi,

I am using ibm_db drivers to connect my i series database. My connection string is "ibm_db_sa+pyodbc400://u000XXXX:xxx...@172.129.253.59:446/T10050bp".

Query : SELECT * FROM SOURCESM."MYTABLE" 
WHERE COLUMN3 < '2000'

In my database column COLUMN3 is an Integer.

When I ran my application on Ubuntu 16.04 platform, this query returned empty result set.

When I ran this query on Windows platform, it returned correct result.

Why its behave differently on different platforms ?

Saba Kauser

unread,
Jul 16, 2019, 8:40:12 AM7/16/19
to ibm_db
Hello Siddhesh,
could you please collect traces from both working and non-working machines and share.

cd `clidriver install path`
cd adm
db2trc on -f trc.dmp
`run your application`
db2trc off
db2trc flw trc.dmp trc.flw
db2trc fmt trc.dmp trc.fmt
db2trc fmt -c trc.dmp trc.fmtc
db2trc fmt -cli trc.dmp trc.cli
and share the trc.flw, trc.fmt, trc.fmtc and trc.cli files

Siddhesh Naik

unread,
Jul 17, 2019, 8:43:13 AM7/17/19
to ibm_db
Hi Saba,
Thanks. Could you please more be specific about cd `clidriver install path`?. I am not getting which path you are talking about. 

Saba Kauser

unread,
Jul 17, 2019, 8:47:07 AM7/17/19
to ibm_db
when ibm_db is installed, it would auto-install the clidriver under site-packages, I think under egg folder of ibm_db.

Siddhesh Naik

unread,
Jul 18, 2019, 6:16:20 AM7/18/19
to ibm_db
Hi Saba,

To connect db2i , I am using DB2i odbc drivers.

Saba Kauser

unread,
Jul 18, 2019, 6:17:30 AM7/18/19
to ibm_db
Then you should post this in respective forum. I won't be able to help as I don't own these, neither do I have any expertise with it.
Reply all
Reply to author
Forward
0 new messages