Results 1 to 7 of 7

Thread: db2 federation

  1. #1
    Join Date
    Feb 2004
    Location
    earth
    Posts
    96

    Unanswered: db2 federation

    Hello,

    I am trying to setup db2 federation from db2 and connect oracle database.

    Step 1
    Installed Oracle client 11.02 and install Infosphere Federation V10.5 FP3 on top of DB2 V10.5 FP3 Enterprise Edition.

    Step 2
    Installed InfoSphere Wrapper and select Oracle Data Source.
    I am able to fine libdb2net8.so file which is require when create a wrapper.

    Step 3
    Create manually filename db2dj.ini
    In db2dj.ini, I have write the ORACLE_HOME installation path as :
    ORACLE_HOME=/usr/lib/oracle/11.2/client64

    Step 4
    db2set for DB2_DJ_INI=/home/db2inst1/sqllib/cfg/db2dj.ini
    db2set DB2LIBPATH=/home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib32
    db2set DN2ENVLIST=DB2LIBPATH

    Step 5
    CREATE WRAPPER ORACLE_LINK LIBRARY 'libdb2net8.so' OPTIONS ( ADD DB2_FENCED 'N' );

    When run step 5, the error message show as below here

    Operation invalid for application execution environment. Reason code = "31".. SQLCODE=-30090, SQLSTATE=25000, DRIVER=4.18.60

    When I look at the Reason Code="31", it say :
    31
    The CREATE WRAPPER statement failed because the DB2LIBPATH environment variable does not contain the path of the client library, and the database manager failed to automatically add that client library path to the DB2LIBPATH environment variable.
    For reason code 31,
    Perform the following steps:

    Manually add the path of the client library for the new wrapper to the DB2LIBPATH environment variable.
    Restart the DB2 database manager.
    Execute the CREATE WRAPPER statement again.

    https://www-01.ibm.com/support/knowl...2F2-6-27-26-22

    I have set the DB2LIBPATH in db2 registry, is there any step which I have miss or misconfigure?

    Thanks in advance!

  2. #2
    Join Date
    May 2012
    Location
    Canberra, Australia
    Posts
    176
    Provided Answers: 6
    What O/S? A couple of steps pertinent to the o/s
    http://www-01.ibm.com/support/knowle....0%2F8-4-3-9-0
    Andy

    "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use hammer.” — IBM maintenance manual, 1975 "

  3. #3
    Join Date
    Feb 2004
    Location
    earth
    Posts
    96
    Thanks Andy.
    DB2 federation server installed in RedHat Linux 6.

    I have manually created db2bj.ini file on federated server and in db2dj.ini, I have write the ORACLE_HOME installation path as :
    ORACLE_HOME=/usr/lib/oracle/11.2/client64

    echo $ORACLE_HOME
    /usr/lib/oracle/11.2/client64

    echo $PATH
    /usr/lib/oracle/11.2/client64/bin:home/db2inst1/bin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc

    I have stopped and start the instance again.

    I have try to create the wrapper and getting the same error message

    CREATE WRAPPER ORACLE_LINK LIBRARY 'libdb2net8.so' OPTIONS ( ADD DB2_FENCED 'N' );

    Operation invalid for application execution environment. Reason code = "31".. SQLCODE=-30090, SQLSTATE=25000, DRIVER=4.18.60

    Thanks in advance!

  4. #4
    Join Date
    May 2012
    Location
    Canberra, Australia
    Posts
    176
    Provided Answers: 6
    Did you execute the profile?
    On federated servers that run Linux or UNIX, execute the DB2 instance .profile file by entering:
    . $HOME/.profile
    Andy

    "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use hammer.” — IBM maintenance manual, 1975 "

  5. #5
    Join Date
    Feb 2004
    Location
    earth
    Posts
    96
    I cant find profile in redhat linux.

    I have executed the bash_profile as follow:
    . $HOME/.bash_profile

    I try to create the wrapper again and it show the same error message.

    CREATE WRAPPER ORACLE_LINK LIBRARY 'libdb2net8.so' OPTIONS ( ADD DB2_FENCED 'N' );

    Operation invalid for application execution environment. Reason code = "31".. SQLCODE=-30090, SQLSTATE=25000, DRIVER=4.18.60

    Thank you

  6. #6
    Join Date
    Feb 2004
    Location
    earth
    Posts
    96
    Finally it work now, I have included step no. 5.

    Step 1
    Installed Oracle client 11.02 and install Infosphere Federation V10.5 FP3 on top of DB2 V10.5 FP3 Enterprise Edition.

    Step 2
    Installed InfoSphere Wrapper and select Oracle Data Source.
    I am able to fine libdb2net8.so file which is require when create a wrapper.

    Step 3
    Create manually filename db2dj.ini
    In db2dj.ini, I have write the ORACLE_HOME installation path as :
    ORACLE_HOME=/usr/lib/oracle/11.2/client64

    Step 4
    db2set for DB2_DJ_INI=/home/db2inst1/sqllib/cfg/db2dj.ini
    db2set DB2LIBPATH=/home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib32
    db2set DN2ENVLIST=DB2LIBPATH

    Step 5
    Go to db2 home sqllib /home/db2inst1/sqllib
    Before the line of export LD_LIBRARY_PATH, enter the following lines.

    p="/usr/lib/oracle/11.2/client64/lib"
    LD_LIBRARY_PATH=$(add_to_path) "${p}" "${LD_LIBRARY_PATH}")
    DB2LIBPATH=$(add_to_path "${p}" "${DB2LIBPATH}")

    db2stop force
    db2start

    Note: change to root user and change back to db2inst1 user.

    Step 6
    CREATE WRAPPER ORACLE_LINK LIBRARY 'libdb2net8.so' OPTIONS ( ADD DB2_FENCED 'N' )

    Query execution time => 24 ms

  7. #7
    Join Date
    Sep 2015
    Posts
    1

    Thanks

    thanks, this discussion helped me to solve my problem.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •