CLI driver error after running IDS 11.70 for a few days

51 views
Skip to first unread message

Julian Hamann

unread,
May 27, 2019, 7:20:30 AM5/27/19
to ibm_db
Hello,

I have an issue with my python code, where after a few days the ibm_db client can no longer connect to the database. Interestingly, this error disappears once I restart the Informix Dynamic Server and then reoccurs after a few days (restart Friday evening, error on Monday morning).
My setup is a one month old install of Ubuntu 18.04 with anaconda 3.7 64bit. I installed ibm_db via pip into a virtual environment and I'm connecting to an IDS 11.70 instance over LAN. I believe I set everything up correctly, as the connection works properly on a fresh restart. Anyways, this is my current code:

import ibm_db
import ibm_db_dbi
import pandas as pd


# ----------------- Connection String
driver = 'IBM DB2 ODBC DRIVER'
database = 'bop'
hostname = '-------------'
port = '49502'
protocol = 'tcpip'
uid = '-----------------'
pwd = '--------------'
authentication = 'server'

conn_str = f"DRIVER={{{driver}}};DATABASE={database};HOSTNAME={hostname};PORT={port};" + \
    f"PROTOCOL={protocol};UID={uid};PWD={pwd};authentication={authentication}"

ibm_db_conn = ibm_db.connect(conn_str,'','')
conn = ibm_db_dbi.Connection(ibm_db_conn)

print(f'Connected to {conn.dbms_name} running on version {conn.dbms_ver}.')


Running this results in the error:

Exception                                 Traceback (most recent call last)
<ipython-input-4-6c8c8c33c46f> in <module>
----> 1 ibm_db_conn = ibm_db.connect(conn_str,'','')
      2 conn = ibm_db_dbi.Connection(ibm_db_conn)
      3 
      4 print(f'Connected to {conn.dbms_name} running on version {conn.dbms_ver}.')

Exception: [IBM][CLI Driver] SQL30061N  The database alias or database name "BOP               " was not found at the remote node.  SQLSTATE=08004 SQLCODE=-30061


I tried my best on finding the cause for this but I'm kind of a the end of my knowledge here. Also I'm a fairly new user of IDS and unfortunately there is no other employee around who knows anything about this DBMS.

Thanks for any help and best regards
Julian

Saba Kauser

unread,
May 27, 2019, 10:38:06 PM5/27/19
to ibm_db
Hello Julian,
This seem to be your server configuration problem. It seem like the Informix server is having some reset.  I suggest you to post this query in IDS forums. I believe this has something to do with the DRDA port of your IDS server.

Julian Hamann

unread,
Jun 12, 2019, 12:38:45 PM6/12/19
to ibm_db
Hello,

I have finally found the issue. The database server has set a non-standard locale (I think). After changing the connection string to:

conn_str = f"DATABASE={database};HOSTNAME={hostname};PORT={port};" + \
    f"PROTOCOL={protocol};UID={uid};PWD={pwd};authentication={authentication};DBNLS=2;DB_LOCALE=EN_US.819;"

So this 'issue' would be closed then.

Best regards
Julian
Reply all
Reply to author
Forward
0 new messages