How do I get a sessions session id (sid). I have tried using the following:
but got nothing. Had initally opened 2 sessions with the same user, of which I wanted to trace one of them using the set_sql_trace_in_session procedure. Using
I could get identify them by username but I dint know which session was which.
Code:
SELECT sys_context('USERENV','SID')
FROM DUAL
but got nothing. Had initally opened 2 sessions with the same user, of which I wanted to trace one of them using the set_sql_trace_in_session procedure. Using
Code:
select username, sid, serial#, command
from v$session;
I could get identify them by username but I dint know which session was which.