-- 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');
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;
mysid.sql
returns the own session's SID (intended to be stored in the $SQLPATH
directory)