Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: set sqlprompt to something useful
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.
Received on Fri Dec 10 1999 - 06:52:49 CST
![]() |
![]() |