-
How can i know my SID session when i connect to ORACLE ??
-
select sid, serial# , username from v$session
where username = 'yourname';
-
SELECT sid
FROM v$session
WHERE audsid = userenv('SESSIONID');
You can have more sessions with the same username.
-
Hi akkerend.
This query is great! But what exactly is audsid? And what does the function 'userenv' do? Thanks.
-
The function USERENV('option') returns information about the current session. Other options are TERMINAL and LANGUAGE.
AUDSID is the auditing session ID. It's a unique ID for sessions, used for auditing. AUDSID is 0 for sessions created by jobs.
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
|