Re: Logging In
- From: Steve Howard <stevedhoward@xxxxxxxxx>
- Date: Fri, 7 Dec 2007 17:44:16 -0800 (PST)
On Dec 7, 8:04 pm, "ame...@xxxxxxx" <ame...@xxxxxxx> wrote:
Hi,
When you log into a server you usually get a list of default
environment variables that look like below. Our oracle account does
not have a .profile. However, I want to change the default ORACLE_SID
when a user logs in.
Does anyone know what file I'd modify? I get entries like below when
I log in as any user:
declare -x ORACLE_BASE="/opt/oracle/product"
declare -x ORACLE_HOME="/opt/oracle/product/ora10"
declare -x ORACLE_SID="OR00"
declare -x PATH="/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/
X11R6/bin:/home/oracle/bin"
declare -x PWD="/home/oracle"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="::ffff:205.234.192.162 41110 22"
declare -x SSH_CONNECTION="::ffff:205.234.192.162 41110 ::ffff:
205.234.192.188 22"
declare -x SSH_TTY="/dev/pts/3"
declare -x TERM="xterm"
declare -x USER="oracle"
Thanks!!!
Try modifying what is below...
sids=`cat /etc/oratab | grep -v "#" | grep -v '*' | cut -f1 -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=/bin:/usr/bin:/usr/local/bin:$ORACLE_HOME/bin
break
done
As others have mentioned, you could just rely on oraenv once you set
the ORACLE_SID.
HTH,
Steve
.
- References:
- Logging In
- From: amerar@xxxxxxx
- Logging In
- Prev by Date: Re: dropping tablespaces and datafiles
- Next by Date: Re: Calculating NPV
- Previous by thread: Re: Logging In
- Next by thread: Re: Logging In
- Index(es):
Relevant Pages
|
Loading