Skip to content

Fail to connect to IBMi from Ubuntu Server #1023

@cavamacmoe

Description

@cavamacmoe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions