Oracle Session Management

Current Session

SELECT SYS_CONTEXT('USERENV','SID')

  FROM dual;

SELECT DISTINCT sid

  FROM v$mystat;

SELECT TO_NUMBER(SUBSTR(DBMS_SESSION.UNIQUE_SESSION_ID,1,4),'XXXX') AS mysid

  FROM dual;

Bibliography