Library problem in Uprocs that contain the command sqlplus
search cancel

Library problem in Uprocs that contain the command sqlplus

book

Article ID: 86359

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

Error Message :
In the job log:
exec(): 0509-036 Cannot load program because of the following errors:
Patch level detected:Dollar Universe 6.3.00
Product Version: Dollar.Universe 6.3.01

Description :When a Uproc of type CL_INT (internal script) contains the command sqlplus, it can happen that the Dollar Universe libraries are found instead of the Oracle libraries. This can lead to a version conflict and will abort the Uproc. So far, the problem has only been detected on AIX.

Environment

OS: All Unix

Cause

Cause type:
Configuration
Root Cause: In unienv.ksh file, the Dollar Universe libraries are added in front of the $PATH variable.

Resolution

The solution proposed below has never been tested in a live environment and should be considered as a guidance and work in progress:

Other solutions may work as well but please consider that the file unienv.ksh should never be changed since it could be overwritten during an upgrade. This solution is independent of upgrades.

While the $PATH variable can be corrected in unienv_specific.ksh, such a solution may be too general since it applies to all Uprocs and Uproc types. This solution uses U_ANTE_UPROC because this gives the possibility to test the variable S_UPROC_TYPE. This is safer because only in the case of internal Uprocs the $PATH variable is changed.

Before testing please verify that on your system the library libclntsh.a is available in the directory $ORACLE_HOME/lib.
If this is not the case modify the script below in such a way that the Oracle libraries can be found.

Please note that since Automic has never reproduced the issue, this solution has never been tested on a live environment. Please test this Workaround in Preproduction / Validation / UAT

Place the script below in the file /data/nodefiles/U_ANTE_UPROC and make sure that it is executable.

################
#!/bin/ksh

echo "### Begin U_ANTE_UPROC"

#set -x -v

# Check whether $ORACLE_HOME variable is not empty
if [ ! -z ${ORACLE_HOME} ]; then
echo "###"
echo "### ORACLE_HOME is detected, verifying whether the library path has to be updated for sqlplus"
# Checking if we are executing a type of Uproc that potentially contains an sqlplus script,
# outside the Oracle Manager for Dollar Universe.
# If this is the case we make sure that sqlplus finds its own libraries
# Issues have only been encountered on AIX but we makse sure to change all library path variables
#echo $S_UPROC_TYPE
if [ ${S_UPROC_TYPE} = CL_INT ] ; then
#if [ ${S_UPROC_TYPE} = CL_INT -o ${S_UPROC_TYPE} = CL_EXT -o ${S_UPROC_TYPE} = CMD ] ; then # Use this line to extended the solution to CL_EXT and CMD
# We add the sqlplus path in front of the path variables (like in unienv.ksh)
# but here with use the Oracle libraries path instead of the Universe OAPP path
# ${UNI_DIR_EXEC}/lib must be the last of the list
for ADDEDPATH in \
${UNI_DIR_EXEC}/lib64 \
${ORACLE_HOME}/lib \
${UNI_DIR_EXEC}/bin_sap/lib \
${UNI_DIR_EXEC}/lib
do
export LD_LIBRARY_PATH="${ADDEDPATH}:${LD_LIBRARY_PATH}"
export LIBPATH="${ADDEDPATH}:${LIBPATH}"
export SHLIB_PATH="${ADDEDPATH}:${SHLIB_PATH}"
done
echo
echo "### Library path variables updated for sqlplus"
echo "###"
fi
fi
#set +x +v

echo "### End U_ANTE_UPROC"

################

Fix Status: No Fix

Additional Information

Workaround :
N/A