How about:

select
   s.username,
   s.sid
from v$session s
where userenv('SESSIONID') = s.audsid
/

??

Jared



                                                                                       
                             
                    "Post, Ethan"                                                      
                             
                    <[EMAIL PROTECTED]       To:     Multiple recipients of list ORACLE-L 
<[EMAIL PROTECTED]>        
                    >                    cc:                                           
                             
                    Sent by:             Subject:     SID Environment Variable         
                             
                    [EMAIL PROTECTED]                                                     
                             
                    om                                                                 
                             
                                                                                       
                             
                                                                                       
                             
                    10/02/01 11:25                                                     
                             
                    AM                                                                 
                             
                    Please respond                                                     
                             
                    to ORACLE-L                                                        
                             
                                                                                       
                             
                                                                                       
                             




I am trying to find an environment variable that returns the current
session's SID.  I see things like ora_login_user but can't find anything
SID
related.  Basically I want to take a statspack snapshot using the SID of
the
current session. - E

------------------------------------------------------------------------------

This e-mail is intended for the use of the addressee(s) only and may
contain privileged, confidential, or proprietary information that is exempt
from disclosure under law.  If you have received this message in error,
please inform us promptly by reply e-mail, then delete the e-mail and
destroy any printed copy.   Thank you.

==============================================================================

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Post, Ethan
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to