db2

Symbol not found: error while using ibm_db library in Python

Symbol not found: error while using ibm_db library in Python Question: I am using Monterey MacOS and Python 3.10. While running this sample code: from ibm_db import connect from ibm_db import fetch_assoc from ibm_db import tables connection = connect(‘DATABASE=<DATABASE>;’ ‘HOSTNAME=<HOSTNAME>;’ ‘PORT=<PORT>;’ ‘PROTOCOL=<PROTOCOL>;’ ‘UID=<UID>;’ ‘PWD=<PWD>;’, ”, ”) I am getting error: ImportError: dlopen(../lib/python3.10/site-packages/ibm_db.cpython-310-darwin.so, 0x0002): Symbol not …

Total answers: 2

IBM DB2 Connections

IBM DB2 Connections Question: Why can I connect to my sql db2 while using jupyter notebooks in ibm cloud but when I try to run the same connection string in ms vs code I get an error? ”’%sql ibm_db_sa://un:pw@host:port/db?security=SSL”’ (ibm_db_dbi.Error) ibm_db_dbi::Error: [IBM][CLI Driver] SQL5005C The operation failed because the database manager failed to access either …

Total answers: 2

How to check status of long lasting ibm_db connection in python

How to check status of long lasting ibm_db connection in python Question: I’m developing and API that reads data from DB2 and returns corresponding result (using Flask on Python). Initially I had connection open on each API call but since number of connections per second is growing I thought it’s better to open DB connection …

Total answers: 2

Connect to db2 database with Python

Connect to db2 database with Python Question: I’m working on an app that needs to connect to an ibm db2 database. Using DBeaver I can successfully connect to the database (I provide him the db2cc.jar and db2cc4.jar files). It looks to me as DBeaver is using my Window’s credentials to login, because I didn’t need …

Total answers: 3

DB2: Getting [IBM][CLI Driver] SQLSTATE=58004 SQLCODE=-1042

DB2: Getting [IBM][CLI Driver] SQLSTATE=58004 SQLCODE=-1042 Question: I am new to IBM DB2 world and trying to establish a connection with DB2 using Jupyter notebook: import ibm_db try: ibm_db.pconnect(“DATABASE=DB2;HOSTNAME=hostname;PORT=60000;PROTOCOL=TCPIP;UID=user;PWD=password;”, “”, “”) print(“Connected to DB”) except Exception as e: print(e) But getting: [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004 SQLCODE=-1042 Any suggestions here? Edit: …

Total answers: 2

Converting IBM DB2 IXF file to CSV or XML

Converting IBM DB2 IXF file to CSV or XML Question: How do I convert an exported IXF file (using db2 export) to a human-readable format, like CSV or XML? I am comfortable with doing it in Python or .NET C#. Asked By: GPX || Source Answers: The PC/IXF format is fairly complex, and is practically …

Total answers: 4