Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User session id

Status
Not open for further replies.

haste

Programmer
Feb 27, 2005
96
GH
How do I get a sessions session id (sid). I have tried using the following:
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.
 
Not sure, but I think if the command column shows 3, that is the user issuing the select statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top