Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: what query to ID the specific DBMS session?
joeNOSPAM_at_BEA.com wrote:
> On May 2, 1:46 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> > thanks! I have tried "select SYS_CONTEXT('USERENV','SESSIONID') from > dual" > and it seems to work. I am not clear on the difference between SID and > SESSIONID... >
SESSIONID returns the "auditing session identifier". This value corresponds to the AUDSID column of V$SESSION. So you can obtain the SID from V$SESSION as follows:
SELECT sid FROM v$session
WHERE audsid=SYS_CONTEXT('USERENV','SESSIONID');
This is just one more method to be lumped in with the others that have been offered in this thread....
Cheers,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - Unknown -- Posted via a free Usenet account from http://www.teranews.comReceived on Thu May 03 2007 - 09:39:12 CDT
![]() |
![]() |