Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

IBM DB2 support

Platipus edited this page Sep 12, 2024 · 8 revisions

Lets say this are the tables:

db2 list tables for all |grep WEB
FAVORITE_WEBREPORTS             DBO             T     2015-12-22-09.13.38.239532
WEBREPORTS                      DBO             T     2015-12-22-09.13.38.088070
WEBREPORTS_FILES                DBO             T     2015-12-22-09.13.38.397378

and we are connecting with DB2INST1 user. The Python ibm_db driver will report:

Traceback (most recent call last):
...
ibm_db_dbi.ProgrammingError: ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0204N  "DB2INST1.webreports" is an undefined name.  SQLSTATE=42704 SQLCODE=-204
...

If we create an alias, the error will go away:

db2 "create alias webreports for dbo.webreports"
db2 list tables for all |grep WEB
WEBREPORTS                      DB2INST1        A     2024-09-12-12.05.02.042117
WEBREPORTS_FILES                DB2INST1        A     2024-09-12-13.21.30.675683
FAVORITE_WEBREPORTS             DBO             T     2015-12-22-09.13.38.239532
WEBREPORTS                      DBO             T     2015-12-22-09.13.38.088070
WEBREPORTS_FILES                DBO             T     2015-12-22-09.13.38.397378

At this stage I have no idea how else to solve this problem :(

Clone this wiki locally