Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: set sqlprompt to something useful
Larry, that's true. I actually put the below stuff into a set_prompt.sql script, call it from my login. I've also got a conn script I use when connecting from existing sqlplus session, again calling set_prompt from there. and, since I'm paranoid, I'll call set_prompt randomly.
In article <82qt2v$qb7$1_at_nnrp1.deja.com>,
Larry DiGiovanni <ldigiova_at_yahoo.com> wrote:
> Is it just me, or does login.sql not run when I CONNECT to another
> instance within a SQL*Plus session? If this is the case, then isn't
> the prompt set by the below at risk of indicating the wrong instance?
>
> > I put something like this:
> >
> > column global_name new_value gname
> > set termout off
> > select lower(user) || '@' ||
> > decode(global_name, 'ORACLE8.WORLD', '8.0', 'ORA8I.WORLD',
> > '8i', global_name ) global_name from global_name;
> > set termout on
> > set sqlprompt '&gname> '
> >
> > into my login.sql. you cannot really get at the SID (environment
> variable --
> > you could problem do something with HOST) so I use the global
> database name.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Dec 10 1999 - 07:43:16 CST
![]() |
![]() |