Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: set sqlprompt to something useful

Re: set sqlprompt to something useful

From: Larry DiGiovanni <ldigiova_at_yahoo.com>
Date: Fri, 10 Dec 1999 12:52:49 GMT
Message-ID: <82qt2v$qb7$1@nnrp1.deja.com>


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

Original text of this message

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