-
How can I determine programmatically which session I'm in if I have multiple sessions open? When I query v$session, how can I pick my current session?
Oracle DBA and Developer
-
select sid
from v$session
where audsid=userenv('sessionid')
/
this shows your current SID
-
TRY THIS AND YOU CAN SEE THE STATUS AND THE PROGRAMS YOU ARE IN
SELECT * FROM v$session
where OSUSER='YOURNAME';
Donna
-
Pando: Thanks - works great. I found a different way also - select distinct(sid) from v$mystat;
Donna - I was looking for something to identify just my current session even if I have multiple sessions from the same machine. Thanks for the input though.
BTW - OSUSER includes the DOMAIN on NT - FYI
Oracle DBA and Developer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|