Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

unable to connect to db2 database after db2 upgrade

  • 1.  unable to connect to db2 database after db2 upgrade

    Posted Mon December 30, 2024 06:34 PM

    Hi,

    I have upgraded db2 11.1 to 11.5. Post upgrade unable to connect to database from config tool. dbeaver and version.bat is also giving same connection error.

    Please find message below.

    com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][3.69.71] A communication error occurred during operations on the connection's underlying socket, socket input stream,
    or socket output stream.  Error location: Reply.fill() - insufficient data (-1).  Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001

    Thanks,



    ------------------------------
    suman kumar
    ------------------------------


  • 2.  RE: unable to connect to db2 database after db2 upgrade

    Posted Tue January 28, 2025 01:05 AM
    Edited by Jan-Willem Steur Tue January 28, 2025 01:07 AM

    @Suman, it seems that the access credentials to the upgraded DB2 instance are not properly re-installed.  See also https://www.ibm.com/docs/en/manta-data-lineage?topic=ta-db2-extraction-fails-insufficient-data-errorcode-4499-sqlstate08001

    Did you tried to access the DB2 instance via terminal and using the standard DB2 commands?  IF you can access the database via the DB2 commands, then you at least know that the issue isn't at database entry level but probably caused by wrong credentials or wrong crypto (cryptox) keys.

    beaver only connects when the jdbc string and db credentials and schemes are properly set, so that isn't an indicator itself. You may need to access via the DB2 command itself.

    Try this:

    ===== Preparation =========

    db2icrt -s ese -u db2admin, <YourPassword> -r 50005,50005 ctginst1

    set db2instance=ctginst1

    db2start

    db2 update dbm config using SVCENAME 50005 DEFERRED

    db2stop

    db2set DB2COMM=tcpip

    db2start

     

    export PATH="$/opt/ibm/db2/V11.5.0.0/bin:$PATH"

    export PATH="$/opt/ibm/db2/V11.5.0.0/instance:$PATH"

    export PATH="$/opt/ibm/db2/V11.5.0.0/adm:$PATH"

     

    ======= Delete / Drop Databases ========

    db2stop force

    db2start



    ======= login as CTGINST1 =========

    su - ctginst1

    db2stop force

    db2start

    db2 connect to <Your DB Instance>

     

    db2 CREATE BUFFERPOOL MAXBUFPOOL IMMEDIATE SIZE 4096 AUTOMATIC PAGESIZE 32 K

    db2 CREATE REGULAR TABLESPACE MAXDATA PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL

    db2 CREATE TEMPORARY TABLESPACE MAXTEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOL

    db2 CREATE REGULAR TABLESPACE MAXINDEX PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL

    db2 GRANT USE OF TABLESPACE MAXDATA TO USER MAXIMO

    db2 create schema maximo authorization maximo

    db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER MAXIMO

    db2 GRANT USE OF TABLESPACE MAXDATA TO USER MAXIMO

    db2 GRANT CREATEIN,DROPIN,ALTERIN ON SCHEMA MAXIMO TO USER MAXIMO

    db2 connect reset



    ------------------------------
    Jan-Willem Steur
    Manager Business Development
    ZNAPZ b.v.
    Breda
    +31 6 25639950
    Jan-Willem
    ------------------------------