IBM Support

IC94309: WHEN A SCRIPT RUNS IN TASK CENTRE, EXTRA SLASH ADDED TO LIBPATH CAUSING INSTANCE ENV SWITCH USING DB2PROFILE TO FAIL

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A script runs in Task Centre can use db2profile to switch
    instance environment. For example,
    . /home2/db2inst23/sqllib/db2profile
    where db2inst23 can be an instance on a different db2 level.
    The problem is an extra slash is added to env variable LIBPATH
    when the script runs. So it has
    value something like the following :
    /home2/db2ins26/sqllib//lib64:/home2/db2ins26/sqllib/function:/h
    ome2/db2ins26/sqllib/function/unfenced::/home2/db2ins26/sqllib/j
    ava/jdk64/jre/bin/classic:/home2/db2ins26/sqllib/java/jdk64/jre/
    bin:/home2/db2ins26/sqllib/java/jdk64/jre/lib:/home2/db2ins26/sq
    llib/java/jdk64/lib:/home2/db2ins26/sqllib/java/jdk64/jre/lib/pp
    c64:/home2/db2ins26/sqllib/java/jdk64/jre/bin/j9vm::/home2/db2da
    s/das/lib:/home2/db2das/das/function:
    
    db2profile cannot recognize the extra slash and therefore after
    calling db2profile, the path is still included in LIBPATH:
    $ cat libpath.after
    /home2/db2ins26/sqllib//lib64:/home2/db2ins26/sqllib/function:/h
    ome2/db2ins26/sqllib/function/unfenced:/home2/db2ins26/sqllib/ja
    va/jdk64/jre/bin/classic:/home2/db2ins26/sqllib/java/jdk64/jre/b
    in:/home2/db2ins26/sqllib/java/jdk64/jre/lib:/home2/db2ins26/sql
    lib/java/jdk64/lib:/home2/db2ins26/sqllib/java/jdk64/jre/lib/ppc
    64:/home2/db2ins26/sqllib/java/jdk64/jre/bin/j9vm:/home2/db2das/
    das/lib:/home2/db2das/das/function:/home2/db2ins23/sqllib/lib64
    
    This is causing the wrong libraries being loaded after the
    instance env switch, ie. libraries from the previous instance
    (db2ins26 in this case) are loaded, instead of
    the libraries from the instance to switch to(db2ins23 in this
    case).
    

Local fix

  • In the script, manually add the correct library path of the
    instance to switch to. For example: export
    LIBPATH=/home2/db2ins23/sqllib/lib64:$LIBPATH
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 9                        *
    ****************************************************************
    

Problem conclusion

  • First fixed in Version 9.7 Fix Pack 9
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC94309

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-07-22

  • Closed date

    2013-12-17

  • Last modified date

    2013-12-17

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC95667 IC96292

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC94309

Modified date: 17 December 2013