Starting with Shareplex 6.0 and up, there is a material change in the the structure of product directory (proddir) and variable directory (vardir). Some of the changes have to do with the fact that the Shareplex installation process now has the flexibility to be installed as root or non-root. Another design change is the encapsulation that is now the norm in Shareplex. During installation and subsequent startup of Shareplex, the environment variables are set at a minimum for SP_SYS_VARDIR, SP_COP_TPORT, SP_COP_UPORT, ORACLE_HOME and ORACLE_SID, among others. There are other environment variables set for PATH, PWD, etc, and some of them depend on user preferences. Then there are some more environment variables that are set by Shareplex on the top of those set by users. This solution delves on determining the comprehensive setting of parameter by Shareplex.
Need to know the environment variable setting by Shareplex.
Besides the parameters set by users, Shareplex also has some of its own environment variables that it sets when sp_cop is launched. These additional environment variables will never remove what is earlier set by users but only complement it. The output of "env | sort" and "./launcher env" presented at the end will make this clear, particularly the value of the variable PATH as set by user and as set later by Shareplex. Shareplex adds some more values to the variable setting as appropriate. Shareplex actually pre-pends (antonym of append) some values to suit its needs. Typically it affects LD_LIBRARY_PATH, SHLIB_PATH, LIBPATH, PATH, SP_SYS_OPTDIR, among others. Different environment variables for library path are created so as to be suitable to a number of different OS platforms (Solaris, HP, etc).
To see exactly how Shareplex adds to the existing setting of the environment variables, issue the "env | sort" at the OS prompt for the session that started Shareplex and then issue the command "./launcher env" at the OS prompt while in /proddir/.apps-modules directory. The following output is taken from an actual Shareplex installation to make the point clear:
A. Issuing "env | sort" at the OS prompt for the session that started Shareplex:
# env | sort
EDITOR=vi
HOME=/
HZ=100
IGNORE_RUN=xxx
LC_COLLATE=en_US.ISO8859-1
LC_CTYPE=en_US.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
LOGNAME=root
MAIL=/var/mail/root
ORACLE_HOME=/u00/oracle/product/10g
ORACLE_SID=quest10g
PATH=/usr/sbin:/usr/bin:/opt/NSCPcom:/usr/ucb:/usr/ccs/bin:/u00/oracle/product/10g/bin:.
PS1=irvsupu16 #
PWD=/u01/sha60/prod/data
SHELL=/sbin/sh
SP_COP_TPORT=5438
SP_COP_UPORT=5438
SP_SYS_VARDIR=/u01/sha60/var
TERM=vt220
TZ=US/Pacific
_=/usr/bin/env
irvsupu16 #
B. Issuing "./launcher env" at the OS prompt while in /proddir/.apps-modules directory:
irvsupu16 # pwd
/u01/sha60/prod/.app-modules
# ./launcher env
_=./launcher
HZ=100
LC_MONETARY=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
PATH=/u00/oracle/product/10g/bin:/u01/sha60/prod/.meta-inf/tools/bin:/usr/sbin:/usr/bin:/opt/NSCPcom:/usr/ucb:/usr/ccs/bin:/u00/oracle/product/10g/bin:.
SP_SYS_VARDIR=/u01/sha60/var
EDITOR=vi
LOGNAME=root
MAIL=/var/mail/root
SP_COP_UPORT=5438
SP_COP_TPORT=5438
ORACLE_SID=quest10g
PS1=irvsupu16 #
LC_MESSAGES=C
LC_CTYPE=en_US.ISO8859-1
IGNORE_RUN=xxx
SHELL=/sbin/sh
HOME=/
LC_COLLATE=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
TERM=vt220
ORACLE_HOME=/u00/oracle/product/10g
PWD=/u01/sha60/prod/.app-modules
TZ=US/Pacific
SP_SYS_OPTDIR=/u01/sha60/prod
SP_GROUP_ADMIN=spadmin
LD_LIBRARY_PATH=/u01/sha60/prod/lib:/u00/oracle/product/10g/lib32:/u00/oracle/product/10g/lib:/u00/oracle/product/10g/lib64
SHLIB_PATH=/u01/sha60/prod/lib:/u00/oracle/product/10g/lib32:/u00/oracle/product/10g/lib:/u00/oracle/product/10g/lib64
LIBPATH=/u01/sha60/prod/lib:/u00/oracle/product/10g/lib32:/u00/oracle/product/10g/lib:/u00/oracle/product/10g/lib64
In summary, to see exactly what environment variables are used by shareplex issue command "launcher env" from <proddir>/.app-modules.