DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: My SID Session

  1. #1
    Join Date
    Oct 2000
    Posts
    2

    Question

    How can i know my SID session when i connect to ORACLE ??

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    select sid, serial# , username from v$session
    where username = 'yourname';

  3. #3
    Join Date
    Jul 2000
    Posts
    296
    SELECT sid
    FROM v$session
    WHERE audsid = userenv('SESSIONID');

    You can have more sessions with the same username.


  4. #4
    Join Date
    Dec 2000
    Posts
    87
    Hi akkerend.

    This query is great! But what exactly is audsid? And what does the function 'userenv' do? Thanks.

  5. #5
    Join Date
    Jul 2000
    Posts
    296
    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
  •  


Click Here to Expand Forum to Full Width