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 -> Displaying DB name at SQLPlus prompt- even after conn/disc, and not SYS user ?

Displaying DB name at SQLPlus prompt- even after conn/disc, and not SYS user ?

From: Thomas T <T_at_T>
Date: Tue, 6 May 2003 13:20:20 -0400
Message-ID: <3eb7eed4$1@rutgers.edu>


So there's this trick:

column my_db new_value my_db noprint
select user || '@' || name "my_db" from v$database; set sqlprompt "&my_db> "

But... when I'm flipping between oracle servers, using disconnect and connect, is there a way that this can change, too? I don't want to have to exit sql*plus between connections just so the above script can run. Also, how can I make this work if I'm -not- using the sys account? Do I need to grant select access on v$database- and isn't that a "bad" thing? :)

And while I'm compiling this wish list; can I get the local service name, instead of the database name, out of Oracle? I searched the web, but I'm getting tons of links that talk about o/s command prompts, and system services...

Thanks!

-Thomas Received on Tue May 06 2003 - 12:20:20 CDT

Original text of this message

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