Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: LD_LIBRARY_PATH in multi-home environment

Re: LD_LIBRARY_PATH in multi-home environment

From: <stevedhoward_at_gmail.com>
Date: 18 Apr 2006 10:46:32 -0700
Message-ID: <1145382392.319016.196080@e56g2000cwe.googlegroups.com>


I use the following...

sids=`cat /etc/oratab | grep -v "#" | grep -v '*' | cut -f1,4 -d: | sort`
PS3="Please select an ORACLE environment from the list above: " select sid in $sids; do
 export ORACLE_SID="$sid"
 export ORACLE_HOME=`grep "$sid": /etc/oratab | cut -f2 -d:`  export PS1=`uname -n`':$LOGNAME:$ORACLE_SID:$PWD>'  export
PATH=/opt/ansic/bin:/usr/bin:/usr/local/bin:/usr/contrib/bin:/usr/ucb:$ORACLE_HOME/bin:.:~/bin:/opt/perf/bin:/opt/java1.3/jr e/bin
 export
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.zip:/home/oracle/java:.  break
done

Purists will agrue that oraenv should be used, but I have used the above (or a derivative) for almost ten years without an issue.

Regardless, I would use somthing where you loop through oratab, and set the parameters according to the ORACLE_SID you choose. You can use ORAENV_ASK to set the parameters (using oraenv) based on your current ORACLE_SID without asking you to confirm, too.

Regards,

Steve Received on Tue Apr 18 2006 - 12:46:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US