Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 9i | login.sql does not run on login by default
fitzjarrell_at_cox.net wrote:
> Anoop wrote:
> > You say at least on 10.2!
> >
> > Does anybody know if it is available on 9.2. I think the biggest
> > benefit for me (if glogin is available) is that it will check when I
> > reconnect and change teh sqlprompt appropriately... login.sql does not.
> >
> > Thanks,
> > Anoop
> >
> > On Jan 10, 1:18 pm, Niall Litchfield <niall.litchfi..._at_dial.pipex.com>
> > wrote:
> > > Brian Peasland wrote:
> > > > mai..._at_bmlam.de wrote:
> > > >> In my experience, under Unix, Oracle looks for login.sql in your
> > > >> current directory. If none is found, it looks for login.sql in $SQLPATH
> > >
> > > >> hth
> > >
> > > >> Bon-Minh Lam
> > >
> > > > The order for finding the login.sql script is:
> > >
> > > > 1) Your current directory
> > > > 2) The directories listed (in order) in your SQLPATH environment variable
> > > > 3) The ORACLE_HOME/sqlplus/admin directory
> > >
> > > > Finally, the contents of the ORACLE_HOME/sqlplus/admin/glogin.sql script
> > > > are executed.
> > >
> > > > HTH,
> > > > Brianglogin.sql is executed before login.sql rather than afterwards - at
> > > least on 10.2. In addition option 3 isn't searched, at least in 10.2. I
> > > don't know if this a change from previous releases - I'd be surprised.
> > >
> > > --
> > > Niall Litchfield
> > > Oracle DBAhttp://www.orawin.info/services
>
>
From
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2899
:
"Variable substitution occurs each time SQLPROMPT is SET. If SQLPROMPT is included in glogin.sql, then substitution variables in SQLPROMPT are refreshed with each login or connect."
This is a change from previous releases. And about time. For 9i, one
can write a little script to replace connect, if one can be scrupulous
about using it instead of connect, like
http://www.oracledba.co.uk/tips/sqlplus_prompt.htm
jg
-- @home.com is bogus. "Steve can make the internal combustion engine appear to be something new and cool." - Reed Hundt, former chairman of the Federal Communications Commission, on Apple CEO Steve Job's announcement of the iPhoneReceived on Wed Jan 10 2007 - 18:26:51 CST