Search notes:

Oracle: Identify one's own session

The «own» session can be identified with v$session and sys_context.
-- The »own« session can be found with sys_context with two possibilities:

select * from v$session where sid    = sys_context('userenv', 'sid'      );
select * from v$session where audsid = sys_context('userenv', 'sessionid');
Github repository oracle-patterns, path: /Installed/dynamic-performance-views/session/identify-own-session.sql
If dbms_support is installed, the corresponding record can also be found with dbms_support.mysid:
select * from v$session where sid=sys.dbms_support.mysid;

See also

The SQL script mysid.sql returns the own session's SID (intended to be stored in the $SQLPATH directory)
SAS: Determine Oracle session's sid and serial

Index