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: own session's SID

Re: own session's SID

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 15 Oct 2004 20:45:36 +0100
Message-ID: <002a01c4b2ef$8a648d70$6702a8c0@Primary>

select dbms_support.mysid from dual;

Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html Optimising Oracle Seminar - schedule updated Sept 19th

I cannot believe that oracle still didn't create a function which would return session id and serial#. This question has been asked ever since Oracle v6 and it is always the same answer: userenv('AUDSID') (or, equivalent version: SYS_CONTEXT('USERENV','AUDSID')) How long will it take for them to finally get it? Is there a reason why we cannot have simple SYS_CONTEXT('USERENV','SID') ?

--
Mladen Gogala
A & E TV Network
Ext. 1216



> -----Original Message-----
> From: Mercadante, Thomas F
> [mailto:thomas.mercadante_at_labor.state.ny.us]
> Sent: Friday, October 15, 2004 3:20 PM
> To: 'mark.powell_at_eds.com'; oracle-l_at_freelists.org
> Subject: RE: own session's SID
>
>
> Or you can...
>
> SELECT sid
> FROM v$session
> WHERE audsid = sys_context('userenv','sessionid')
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 15 2004 - 14:43:10 CDT

Original text of this message

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