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: <tday6_at_csc.com>
Date: Thu, 25 Oct 2001 08:00:54 -0700
Message-ID: <F001.003B454E.20011025075021@fatcity.com>

Put something like this in your glogin.sql or run it after you log in.

set head off
set termout off
column nombre new_v nombre_basedatos
select name nombre FROM V$DATABASE
/
set sqlprompt '&nombre_basedatos> '
set head on
set termout on                                                                                             

                    Ramon Estevez                                                      
    
                    <com.banileja        To:     Multiple recipients of list ORACLE-L  
    
                    s                    <ORACLE-L_at_fatcity.com>                        
    
                    @codetel.net.        cc:                                           
    
                    do>                  Subject:     Instance Name in Sql Prompt      
    
                    Sent by: root                                                      
    
                                                                                       
    
                                                                                       
    
                    10/25/2001                                                         
    
                    10:35 AM                                                           
    
                    Please                                                             
    
                    respond to                                                         
    
                    ORACLE-L                                                           
    
                                                                                       
    
                                                                                       
    





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

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: tday6_at_csc.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 Thu Oct 25 2001 - 10:00:54 CDT

Original text of this message

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