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: SID on sqlplus prompt?

Re: SID on sqlplus prompt?

From: <Diana_Duncan_at_ttpartners.com>
Date: Fri, 08 Jun 2001 14:52:20 -0700
Message-ID: <F001.00322D68.20010608133023@fatcity.com>

How about something like this? Of course, it requires that the user have select access to v$instance -- maybe there's another place to find this. You could do some sort of batch to reference the $ORACLE_SID instead, but the advantage of this is you can put it into glogin.sql or login.sql -- or maybe not. I just tried doing that and it didn't affect anything. Hmm. Oh, well, this may help you...

set heading off
set term off
set feedback off
spool set_sqlprompt.lst
select 'set sqlprompt "' || instance_name || '> "' from v$instance
/
spool off
@set_sqlprompt.lst
set heading on
set term on
set feedback on

Diana Duncan
TITAN Technology Partners
One Copley Parkway, Ste 540
Morrisville, NC 27560
VM: 919.466.7337 x 316
F: 919.466.7427
E: Diana_Duncan_at_ttpartners.com

                                                                                       
                            
                    Walter K                                                           
                            
                    <alden14004_at_y        To:     Multiple recipients of list ORACLE-L 

<ORACLE-L_at_fatcity.com>
ahoo.com> cc: Sent by: Fax to: root_at_fatcity. Subject: SID on sqlplus prompt? com 06/08/2001 04:35 PM Please respond to ORACLE-L

Hi,

Is there a way to get the SID or database name displayed in the command prompt of SQL*Plus? Can this be generated dynamically if I perform a "CONNECT
<user>/<pw>" ?

Thanks!
-w



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Walter K
  INET: alden14004_at_yahoo.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).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Diana_Duncan_at_ttpartners.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 Fri Jun 08 2001 - 16:52:20 CDT

Original text of this message

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