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: Logging In

Re: Logging In

From: joel garry <joel-garry_at_home.com>
Date: Mon, 10 Dec 2007 11:00:58 -0800 (PST)
Message-ID: <71f3df82-10ba-456c-91cd-2cd02fd8b4b8@e23g2000prf.googlegroups.com>


On Dec 7, 5:04 pm, "ame..._at_iwc.net" <ame..._at_iwc.net> 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!!!

The other postings are probably the way to go, but I often do it a bit different, specific to the way a site needs things. It often winds up being a set of scripts in /usr/local/bin in order to allow tailoring of environment variables of the various combinations of Oracle instance and 3rd-party applications. It can be quite the pain to keep updated, but allows unsetting of environment variables as environments are switched. The real trick is to look at (or use) the oraenv script to see how to not get extra ORACLE_HOMEs in the path. As Maxim alluded to, the specifics for setting it up in the login shell can vary, after many years I still wonder why certain ones work the way they do. You may also want to modify profile and login (with or without leading periods depending on system) in /etc to have a good system-wide default.

It helps to state platform info when asking questions like this. See http://www.dbaoracle.net/readme-cdos.htm#subj12

jg

--
@home.com is bogus.
No one expects the IP police!  http://www.news.com/8301-13578_3-9829826-38.html
Received on Mon Dec 10 2007 - 13:00:58 CST

Original text of this message

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