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

Home -> Community -> Usenet -> c.d.o.server -> Re: Display Instance in SQL*Plus Prompt

Re: Display Instance in SQL*Plus Prompt

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Fri, 19 Nov 1999 20:17:52 +0100
Message-ID: <943039141.25633.0.pluto.d4ee154e@news.demon.nl>


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

Original text of this message

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