Query v$session for user name, sid and serial# : session « System Tables Data Dictionary « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> column username format a15 word_wrapped
SQL> column module format a15 word_wrapped
SQL> column action format a15 word_wrapped
SQL> column client_info format a30 word_wrapped
SQL>
SQL> select username||'('||sid||','||serial#||')' username,
  2         module,
  3         action,
  4         client_info
  5  from v$session
  6  where module||action||client_info is not null;

USERNAME        MODULE          ACTION          CLIENT_INFO
--------------- --------------- --------------- ------------------------------
JAVA2S(32,1171) SQL*Plus        processing row  owner=SYS
                                6547


SQL>








30.62.session
30.62.1.Query v$session
30.62.2.Query v$session for user name, sid and serial#
30.62.3.Select $lock and $session for locked objects