Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Display Instance in SQL*Plus Prompt
column value new_value _sid
select substr(global_name,1,instr(global_name,'.') - 1) -- this is a better
solution as EVERYONE has access to this view
from global_name;
set sqlprompt '&_sid SQL>'
Hth,
--
Sybrand Bakker, Oracle DBA
MohammedB <mohammedbNOmoSPAM_at_iadb.org.invalid> wrote in message
news:11f733ec.95caf096_at_usw-ex0102-009.remarq.com...
> Follks,
>
> Anyone got a script that displays the instance name in the SQL*Plus
> prompt when you first sign on. I figure that glogin.sql has to be
> modified and I've got a semblence of an idea but can't get it to work.
>
> I'm doing select value from v$parameter where name = 'db_name'. How do
> I get the value into a variable so that I can use it in the set
> sqlprompt clause?
>
> Thanks
>
> mkb
>
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
Received on Fri Nov 19 1999 - 13:17:52 CST
![]() |
![]() |