userenv('sessionid') : USERENV « SQL Plus « Oracle PL / SQL






userenv('sessionid')

   

SQL>
SQL> -- ALTER SESSION SET SQL_TRACE = TRUE
SQL> -- SQL statement(s) to be traced ...
SQL> -- ALTER SESSION SET SQL_TRACE = FALSE
SQL>
SQL>
SQL> select a.spid
  2  from v$process a, v$session b
  3  where a.addr = b.paddr
  4  and b.audsid = userenv('sessionid')
  5  /

928

1 row selected.

SQL>

   
    
    
  








Related examples in the same category

1.USERENV('TERMINAL')