how can i get sid, serial# of my current session
from v$session (or any related view) ?
thank you!
-Raja
Printable View
how can i get sid, serial# of my current session
from v$session (or any related view) ?
thank you!
-Raja
v$mystat
and the sys_context
If you mean the provided namspace USERENV, then I'm affraid there is no such parameter in there that would return SID or serial# for the session. Note that parameter SESSIONID in that namespace returns auditing session identifier, which is something totaly different from SID in V$SESSION and simmilar views.Quote:
Originally posted by davey23uk
and the sys_context
As mentioned before, V$MYSTAT is the correct view to obtain your current SID.
SELECT sid FROM v$mystat WHERE ROWNUM = 1;
better use rownum < 2, rownum = 1 doesnt work very well with cursor_sharing = FORCE or SIMILAR
thank you everybody!
-Raja