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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Instance Name in Sql Prompt

Re: Instance Name in Sql Prompt

From: <nlzanen1_at_EY.NL>
Date: Thu, 25 Oct 2001 07:33:12 -0700
Message-ID: <F001.003B4476.20011025072737@fatcity.com>

Hi

Add following to your GLOGIN.SQL



rem Display the DB SID and username in the Sql*Plus prompt column dbsid new_value dbsid noprint
select name dbsid from v$database;
column dbusr new_value dbusr noprint
select user dbusr from dual;
column week new_value week noprint
select to_char(sysdate,'WW') week from dual; set sqlprompt '&week-&dbsid-&dbusr> '

Jack

"Ramon Estevez" <com.banilejas_at_codetel.net.do>@fatcity.com on 25-10-2001 16:35:21

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Jack van Zanen/nlzanen1/External/MEY/NL)

Hi Friends,

Excuse me for this dumb question, how do I display the instance name in the
sql prompt. Have 3 DB and would like to know to which one I am connected.

I mean something like that.

DBA1 >
DBA2 >
DB01 >

Regards,

Ramon E. Estevez
com.banilejas_at_codetel.net.do
Dominican Republic
809-565-3121



De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is verboden. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan. Ernst & Young staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden E-mail, noch voor tijdige ontvangst daarvan.

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. Ernst & Young is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: nlzanen1_at_EY.NL

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Oct 25 2001 - 09:33:12 CDT

Original text of this message

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