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: C.S.Venkata Subramanian <csvenkata_at_lycos.com>
Date: Sun, 28 Oct 2001 20:45:35 -0800
Message-ID: <F001.003B6A4A.20011028205021@fatcity.com>

Try this one.

set serveroutput on size 1000000

set trimspool on
set long 5000
set linesize 100
set pagesize 9999

column plan_plus_exp format a80

column global_name new_value gname
set termout off
select lower(user) || '@' ||
decode(global_name, 'ORACLE8.WORLD', '8.0', 'ORA8I.WORLD', '8i', global_name ) global_name from global_name; set sqlprompt '&gname> '
set termout on

--

On Thu, 25 Oct 2001 06:35:21  
 Ramon Estevez wrote:

>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
>
>
Make a difference, help support the relief efforts in the U.S. http://clubs.lycos.com/live/events/september11.asp -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: C.S.Venkata Subramanian INET: csvenkata_at_lycos.com 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 Sun Oct 28 2001 - 22:45:35 CST

Original text of this message

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