-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Hello,
1/
We have installed DB2_RTC_12_1_Linux_x86-64.tar.gz
Using DB2_CUEi_QS_Activation_12.1 we have activated the license.
db2licm -l is showing :
Product name: "DB2 Connect Unlimited Edition for iSeries"
License type: "Client Device"
Expiry date: "Permanent"
Product identifier: "db2consv"
Version information: "12.1"
2/
We have this source code :
import os
import ibm_db
os.environ['IBM_DB_HOME'] = '/opt/ibm/db2/V12.1/'
os.environ['LD_LIBRARY_PATH'] = '/opt/ibm/db2/V12.1/lib/' + (':' + os.environ.get('LD_LIBRARY_PATH', '') if os.environ.get('LD_LIBRARY_PATH') else '')
conn_str = "DATABASE=C6008454;HOSTNAME=cavinfor;PORT=446;PROTOCOL=TCPIP;UID=;PWD=;"
try:
conn = ibm_db.connect(conn_str, '', '')
print("Connexion réussie à DB2")
ibm_db.close(conn)
except Exception as e:
print(f"Échec de connexion: {e}")
3/
Execution fails :
root@SV-NESSIET:/opt/ibm# python3 test.py
Échec de connexion: [IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968 SQLCODE=-1598