Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
#Databases
#Operatingsystems
#Db2
#Databasesolutions
 View Only
  • 1.  Db2 11.5 not able to detect DB2INSTANCE on Linux platform

    Posted 08/14/23 06:19 AM

    Hi Team,

    We are setting instance(db2inst1, db2inst2 etc) correctly. However, the Db2 is not detecting any DB2INSTANCE variable change, it looks like dlclose() call for libdb2.so is not working. Here for backup will be using NetWorker and didn't see issue until 11.1v, upgrading to 11.5v, this issue appears. Need Assistance on this. Please find the attachment of ldd of libdb2.so for reference.



    ------------------------------
    Bharadwaj Reddy
    ------------------------------

    Attachment(s)

    txt
    lddNonworkingDB11.5.txt   1 KB 1 version
    txt
    lddworkingDB11.1.txt   1 KB 1 version


  • 2.  RE: Db2 11.5 not able to detect DB2INSTANCE on Linux platform

    Posted 08/15/23 09:16 AM

    From the 2 files you shared, it seems all the dependencies for libdb2.so are resolved correctly, as there are no missing links (e.g., "not found" entries).

    you have to check for the env variables, try db2set as well. then check if the library libdb2.so is corrupt or doesnt have necessary permission of execution ( + user permission ), because this might be the issue here. 



    ------------------------------
    Youssef Sbai Idrissi
    Software Engineer
    ------------------------------



  • 3.  RE: Db2 11.5 not able to detect DB2INSTANCE on Linux platform

    Posted 08/16/23 05:15 AM
    Edited by Bharadwaj Reddy 08/16/23 11:15 PM

    Hi Youssef Sbai Idrissi,

    Thanks for the reply. The problem doesn't appear to be with environment setting and libdb2.so corruption/permission.

    To give more clarity on the issue, here are the steps we use to retrieve DB information:

    1. Application sets DB2INSTANCE using putenv(). 
    2. Unload libdb2.so and load. 
    3. Use DB2 provided API's to get the Databases under the instance.
    4. Repeat point 1 to 3 for each instances read from global.reg.

    ldd on libdb2.so is attached as there a difference between DB2 11.1 and DB2 11.5 seen.

    With the given steps and with DB2 11.1 the DB info's for the respective instances are returned correct. When using DB2 11.5 we get the same database information for all the instances. ie the first instance from the global.reg. The lib unloading doesn't seems to be happening properly. Was wondering does the changes on the latest lib causing any issue when unloading?. Any advice on how to unload the lib completely.



    ------------------------------
    Bharadwaj Reddy
    ------------------------------



  • 4.  RE: Db2 11.5 not able to detect DB2INSTANCE on Linux platform

    Posted 11/19/23 11:38 PM

    Hi Youssef Sbai Idrissi,

    We use dlclose() to remove the Db2 handle and then load the libdb2.so with new DB2INSTANCE. But the libdb2.so doesn't unload.

    Any help would be appreciated.



    ------------------------------
    Bharadwaj Reddy
    ------------------------------