If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Libray Path error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-11, 03:09
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
Question 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 ~]$
Reply With Quote
  #2 (permalink)  
Old 09-19-11, 03:12
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 09-19-11, 03:20
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
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 .
Reply With Quote
  #4 (permalink)  
Old 09-19-11, 04:06
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
...."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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #5 (permalink)  
Old 09-19-11, 08:15
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #6 (permalink)  
Old 09-19-11, 10:04
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On