Get the current Session ID
SQL> desc v$mystat
Name Null? Type
—————————————– ——– —————————-
SID NUMBER
STATISTIC# NUMBER
VALUE NUMBER
SQL> select distinct sid from v$mystat;
SID
———-
139
SQL> select sid, serial# from v$session
2 where audsid=SYS_CONTEXT(‘USERENV’,’SESSIONID’);
SID SERIAL#
———- ———-
139 6
SQL> select dbms_session.unique_session_id from dual;
UNIQUE_SESSION_ID
——————————————————————————–
008B00060001
Leave a Reply
You must be logged in to post a comment.