Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197

    Question Unanswered: Libray Path error

    Hi when ever logging to my server using db2 admin credential , I get this library path error, But no issues faced

    i use

    Db2 9.7 WSE , on Linux RHEL 5.5.

    Error

    login as: db2inst1
    db2inst1@10.101.226.42's password:
    Last login: Sat Sep 17 14:54:08 2011 from 192.168.172.57
    -bash: LD_LIBRARY_PATH: command not found
    [db2inst1@WESSPTDW02 ~]$

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have you looked at the profile you execute
    there is something like a set or assign statement missing
    LD_library_path=xxxx
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197

    Question

    ################################################## ###########################
    #
    # Licensed Materials - Property of IBM
    #
    # (C) COPYRIGHT International Business Machines Corp. 2011
    #
    # All Rights Reserved.
    #
    # US Government Users Restricted Rights - Use, duplication or
    # disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
    #
    ################################################## ###########################

    #
    # NAME: db2profile
    #
    # FUNCTION: This script sets up a default database environment for
    # Bourne shell or Korn shell users.
    #
    # USAGE: . db2profile
    # This script can either be invoked directly as above or
    # it can be added to the user's .profile file so that the
    # database environment is established during login.
    #
    # #### DO NOT EDIT THIS FILE ####
    #
    ################################################## ###########################

    DB2DIR=/opt/ibm/db2/V9.7

    # Remember the current DB2INSTANCE environment variable
    CUR_INSTNAME=${DB2INSTANCE:=""}

    #-----------------------------------------------------------------------
    # DB2INSTANCE [Default null, values: Any valid instance name]
    # Specifies the instance that is active by default.
    #-----------------------------------------------------------------------
    DB2INSTANCE=db2inst1
    export DB2INSTANCE
    INSTHOME=/home/db2inst1

    # Function to add or remove certain path to or from the specified
    # environment variable.

    AddRemoveString()
    {
    if [ $# -ne 3 ]; then
    return 0
    fi
    var=$1 #The enviornment variable to be processed
    addrm_str=$2 #The new path to be used
    action=$3 #Action: a -> add, r -> remove
    if [ "X${action?}" != "Xa" -a "X${action?}" != "Xr" ]; then
    return 0 # return without doing anything
    fi
    awkval='$1 != "'${addrm_str?}'"{print $0}'
    newval=`eval echo \\${$var:-""} | awk '{for (i=1; i<= NF; ++i) \
    if( $i != VAR && length($i) > 0 ) print $i":"}' FS=":" VAR=${addrm_str?}`
    newval=`echo ${newval?} | sed 's/\: /\:/g'`
    if [ "X${action?}" = "Xa" ]; then
    newval=${newval?}"${addrm_str?}"
    else
    newval=`echo ${newval?} | sed 's/:$//'`
    fi
    eval $var=\"${newval?}\"
    unset var addrm_str awkval newval
    }

    #----------------------------------------------------------------------------
    # If DB2 instance environment is being switched from one instances to another,
    # the entries for old DB2 instance in the original instance enviornment
    # are cleaned up.
    #----------------------------------------------------------------------------
    if [ -n "${CUR_INSTNAME?}" ]; then
    CUR_INSTHOME=`${INSTHOME?}/sqllib/bin/db2usrinf -d ${CUR_INSTNAME?}`
    path_list="bin adm misc db2tss/bin"
    class_list="java/db2java.zip java/db2jcc.jar java/sqlj.zip function \
    java/db2jcc_license_cisuz.jar java/db2jcc_license_cu.jar \
    java/runtime.zip"

    for tmp_entry in ${path_list?}; do
    AddRemoveString PATH ${CUR_INSTHOME?}/sqllib/${tmp_entry?} r
    done
    for tmp_entry in ${class_list?}; do
    AddRemoveString CLASSPATH ${CUR_INSTHOME?}/sqllib/${tmp_entry?} r
    done

    for path_name in LD_LIBRARY_PATH LIBPATH SHLIB_PATH LD_LIBRARY_PATH_32 \
    LD_LIBRARY_PATH_64; do
    for tmp_path in lib lib32 lib64; do
    AddRemoveString ${path_name?} ${CUR_INSTHOME?}/sqllib/${tmp_path?} r
    done
    done

    for path_name in PATH CLASSPATH LD_LIBRARY_PATH LIBPATH SHLIB_PATH \
    LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64; do
    eval path_value=\$$path_name
    if [ "X${path_value}" = "X" ]; then
    unset ${path_name?}
    else
    export ${path_name?}
    fi
    done
    unset CUR_INSTNAME path_list class_list tmp_entry path_name path_value
    fi

    #-----------------------------------------------------------------------------
    # In DB2 instance environment, the DAS environment needs to be cleaned up.
    #-----------------------------------------------------------------------------
    DASWORKDIR=${DASWORKDIR:=""}
    if [ "X${DASWORKDIR}" != "X" ]; then
    AddRemoveString PATH ${DASWORKDIR?}/bin r
    AddRemoveString PATH ${DASWORKDIR?}/adm r
    for path_name in LIBPATH SHLIB_PATH LD_LIBRARY_PATH; do
    for tmp_path in lib function; do
    AddRemoveString ${path_name?} ${DASWORKDIR?}/${tmp_path?} r
    done
    done
    for path_name in PATH LIBPATH SHLIB_PATH LD_LIBRARY_PATH; do
    if [ "X${path_name}" = "X" ]; then
    unset ${path_name?}
    else
    export ${path_name?}
    fi
    done
    fi
    #-----------------------------------------------------------------------------

    for tmp_path in bin adm misc; do
    AddRemoveString PATH ${INSTHOME?}/sqllib/${tmp_path?} a
    done
    if [ -d ${INSTHOME}/sqllib/db2tss/bin ]; then
    AddRemoveString PATH ${INSTHOME}/sqllib/db2tss/bin a
    fi
    export PATH
    unset tmp_path

    #-----------------------------------------------------------------------
    # UDB Extender initialization
    #-----------------------------------------------------------------------
    if [ -f ${INSTHOME}/dmb/dmbprofile ]; then
    . ${INSTHOME}/dmb/dmbprofile
    fi

    #-----------------------------------------------------------------------
    # The following variables are used for JDBC support
    #-----------------------------------------------------------------------
    CLASSPATH=${CLASSPATH:-""}

    if [ -f ${INSTHOME?}/sqllib/java/db2java.zip ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/java/db2java.zip a
    fi
    if [ -f ${INSTHOME?}/sqllib/java/db2jcc.jar ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/java/db2jcc.jar a
    fi
    if [ -f ${INSTHOME?}/sqllib/java/sqlj.zip ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/java/sqlj.zip a
    fi
    if [ -d ${INSTHOME?}/sqllib/function ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/function a
    fi

    if [ -f ${INSTHOME?}/sqllib/java/db2jcc_license_cisuz.jar ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/java/db2jcc_license_cisuz.jar a
    fi

    if [ -f ${INSTHOME?}/sqllib/java/db2jcc_license_cu.jar ]; then
    AddRemoveString CLASSPATH ${INSTHOME?}/sqllib/java/db2jcc_license_cu.jar a
    fi

    AddRemoveString CLASSPATH . a
    export CLASSPATH

    LD_LIBRARY_PATH=${LD_LIBRARY_PATH:""}
    AddRemoveString LD_LIBRARY_PATH ${INSTHOME?}/sqllib/lib64 a
    AddRemoveString LD_LIBRARY_PATH ${INSTHOME?}/sqllib/lib32 a
    export LD_LIBRARY_PATH

    #--------------------------------------------------------------------------
    # Any user changes to the environment goes into userprofile. Modifications
    # to db2profile may be overwritten in fixpaks.
    #--------------------------------------------------------------------------
    if [ -f ${INSTHOME?}/sqllib/userprofile ]; then
    . ${INSTHOME?}/sqllib/userprofile
    fi

    -------------------------------------------------------------

    Hi i have attached my profile, pl. check and let me know where should i update the value....

    Thanks .

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    ...."pl. check and let me know where should i update the value...."
    please check yourself and let me know where was the error
    first : this is NOT a db2 problem (in the db2 forum)
    second : we are not the debuggers for you .. we give hints/help and you have to resolve the problem yourself... that would be to easy..
    they could just cancel your job and request me to resolve your problems (for free..)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by alwayssathya View Post


    Hi i have attached my profile
    This is not your profile; this is db2profile. Look in your shell profile.

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    As the db2profile file states, you should not edit it, because it will be replaced when you apply a Fix Pack. You should edit instead sqllib/userprofile. Look in there to if the problem is there.

    Andy

Posting Permissions

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