Hi there all.
How can I find the sid of the current session,
I got a pl/sql procedure that needs to do a select from v$session_event
but only want to do it for it's own session so I need to know this for
the where clause ?
George
__
George Leonard
select sid from v$mystat
where rownum2
/
Kind Regards
Suhen Pather
IT Software Specialist
Land +27 12 680 3282
Cell +27 82 562 3124
email [EMAIL PROTECTED]
-Original Message-
Sent: Tuesday, December 02, 2003 9:44 AM
To: Multiple recipients of list ORACLE-L
Hi there all.
How can
George,
u can get it from v$mystat.
REgards,
Jp.
02-12-2003 16:44:25, George Leonard [EMAIL PROTECTED] wrote:
Hi there all.
How can I find the sid of the current session,
I got a pl/sql procedure that needs to do a select from v$session_event
but only want to do it for it's own session so I
V$mystat, to what would you join this to understand the
values/statistics, v$session_event?
George
__
George Leonard
Oracle Database Administrator
Professional Services (Oracle Business Unit)
Dimension Data (Pty) Ltd
(Reg. No. 1987/006597/07)
Cell:
Title: RE: Finding SID of current session
You can use also this approach:
select * from v$session_event
where sid = (select sid from v$session where audsid = userenv('SESSIONID'))
Regards, Joze
-Original Message-
From: George Leonard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday
to
[EMAIL PROTECTED]
To
Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc
Subject
Finding SID of current session
Hi there all.
How can I find the sid of the current session,
I got a pl/sql procedure that needs to do a select from v$session_event
but only want to do it for it's own
Universal, and works with 7.3.4 - which is still in common
use - but is deprecated in favour of:
select sid from v$session where audsid =
sys_context('USERENV', 'SESSIONID' );
which still doesn't help if you have several SYS sessions
running, as the sessionID for SYS is