Re: ORA_SID in Sql*Plus?
Date: 1996/10/28
Message-ID: <3274F01A.2E7_at_ibm.net>#1/1
Martin Douglas wrote:
>
> In article <326D4918.3923_at_gte.net>, <dsscott_at_gte.net> writes:
> > Path: news.ou.edu!news.nodak.edu!netnews1.nwnet.net!netnews.nwnet.net!reuter.cse.ogi.edu!psgrain!usenet.eel.ufl.edu!news.mathworks.com!uunet!in3.uu.net!news1
> > From: Douglas Scott <dsscott_at_gte.net>
> > Newsgroups: comp.databases.oracle
> > Subject: ORA_SID in Sql*Plus?
> > Date: Tue, 22 Oct 1996 17:22:18 -0500
> > Organization: GTE Intelligent Network Services, GTE INS
> > Lines: 9
> > Message-ID: <326D4918.3923_at_gte.net>
> > Reply-To: dsscott_at_gte.net
> > NNTP-Posting-Host: cust20.max2.houston.tx.ms.uu.net
> > Mime-Version: 1.0
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> > X-Mailer: Mozilla 3.0 (Macintosh; I; PPC)
> >
> > Does anyone know if there is a way to find out what database instance
> > you're in from inside of Sql*Plus? I go in and out of 2 instances all
> > day long (beta & production databases) and sometimes lose track of which
> > one I'm in (especially after an interruption like a meeting). I could
> > get out and come back in, but if there is someway to tell which instance
> > it would be easier.
> >
> > Douglas Scott
> > dsscott_at_gte.net
> >
>
> SQL> select name from v$database;
>
> Martin Douglas
Create the db_name prompt in sqlplus like :
column DBNAME new_value DB noprint
select value dbname from v$parameter
where name='db_name';
set sqlprompt '&&DB>';
set term on
set echo on
Put it in your global login.
Halina Monka
Received on Mon Oct 28 1996 - 00:00:00 CET