V$SESSION

User sessions and (in 10g and above) wait information.

Columns
   ___________________________
 
   SADDR
   SID
   SERIAL#
   AUDSID
   PADDR
   USER#
   USERNAME
   COMMAND
   OWNERID
   TADDR
   LOCKWAIT
   STATUS
   BLOCKING_SESSION_STATUS   -- 10g and above
   BLOCKING_SESSION   -- 10g and above
   SERVER
   SCHEMA#
   SCHEMANAME
   OSUSER
   PROCESS
   MACHINE
   TERMINAL
   PROGRAM
   TYPE
   SQL_ADDRESS
   SQL_HASH_VALUE
   PREV_SQL_ADDR
   PREV_HASH_VALUE
   MODULE
   MODULE_HASH
   ACTION
   ACTION_HASH
   CLIENT_INFO
   FIXED_TABLE_SEQUENCE
   ROW_WAIT_OBJ#
   ROW_WAIT_FILE#
   ROW_WAIT_BLOCK#
   ROW_WAIT_ROW#
   LOGON_TIME
   LAST_CALL_ET
   PDML_ENABLED
   FAILOVER_TYPE
   FAILOVER_METHOD
   FAILED_OVER
   RESOURCE_CONSUMER_GROUP
   PDML_STATUS
   PDDL_STATUS
   PQ_STATUS
   CURRENT_QUEUE_DURATION
   CLIENT_IDENTIFIER

Notes:
The SYS_CONTEXT function is often a better way to return this information.
V$SESSION truncates the OSUSER to 15 characters, so you might want to use the one from V$SESSION_CONNECT_INFO.

SQL > select * from v$session where sid = (select sid from v$mystat where rownum=1 );

SQL > select * from v$session where client_info like 'rman%';

In 10g and above, to identify the sessions who are locking each other:
SELECT blocking_session_status, blocking_session FROM v$session

Related:

DBMS_APPLICATION_INFO.set_module/.set_client_info
SYS_CONTEXT.audsid       - More Session information
DBA_HIST_ACTIVE_SESS_HISTORY  -- 10g and above
V$ACTIVE_SESSION_HISTORY    -- 10g and above
V$ACCESS
V$MYSTAT 
V$SESSION_CONNECT_INFO 
V$SESSION_CURSOR_CACHE 
V$SESSION_EVENT 
V$SESSION_LONGOPS 
V$SESSION_OBJECT_CACHE 
V$SESSION_WAIT 
V$SESSTAT.sid 
V$SESS_IO 


© Copyright SS64.com 1999-2014
Some rights reserved