You are on page 1of 8

V$SESSION

V$SESSION Column SADDR SID SERIAL#

displays session information for each current session.


Datatype RAW(4 | 8) NUMBER NUMBER Description Session address Session identifier Session serial number. Used to uniquely identify a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID. Auditing session ID Address of the process that owns the session Oracle user identifier

AUDSID PADDR USER# USERNAME COMMAND

NUMBER RAW(4 | 8) NUMBER

VARCHAR2(30) Oracle username NUMBER Command in progress (last statement parsed); for a list of values, see Table 9-2. These values also appear in the AUDIT_ACTIONS table. Identifier of the user who owns the migratable session; the column contents are invalid if the value is 2147483644 For operations using Parallel Slaves, interpret this value as a 4byte value. The low-order 2 bytes represent the session number and the high-order bytes represent the instance ID of the query coordinator.

OWNERID

NUMBER

TADDR LOCKWAIT STATUS

VARCHAR2(8) VARCHAR2(8) VARCHAR2(8)

Address of the transaction state object Address of the lock the session is waiting for; NULL if none Status of the session: ACTIVE - Session currently executing SQL INACTIVE - Session which is inactive and either has no configured limits or has not yet exceeded the configured limits KILLED - Session marked to be killed CACHED - Session temporarily cached for use by Oracle*XA SNIPED - An inactive session that has exceeded some configured limits (for example, resource limits specified for the resource manager consumer group or idle_time specified in the user's profile). Such sessions will not be allowed to become active again.

SERVER

VARCHAR2(9)

Server type: DEDICATED SHARED PSEUDO POOLED NONE Schema user identifier

SCHEMA# SCHEMANAME OSUSER PROCESS

NUMBER

VARCHAR2(30) Schema user name VARCHAR2(30) Operating system client user name VARCHAR2(24) Operating system client process ID

Column MACHINE PORT TERMINAL PROGRAM TYPE SQL_ADDRESS SQL_HASH_VALUE SQL_ID SQL_CHILD_NUMBER SQL_EXEC_START SQL_EXEC_ID

Datatype

Description

VARCHAR2(64) Operating system machine name NUMBER Client port number

VARCHAR2(30) Operating system terminal name VARCHAR2(48) Operating system program name VARCHAR2(10) Session type RAW(4 | 8) NUMBER Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed Used with SQL_ADDRESS to identify the SQL statement that is currently being executed

VARCHAR2(13) SQL identifier of the SQL statement that is currently being executed NUMBER DATE NUMBER Child number of the SQL statement that is currently being executed Time when the execution of the SQL currently executed by this session started; NULL if SQL_ID is NULL SQL execution identifier; NULL if SQL_ID is NULL or if the execution of that SQL has not yet started (see V$SQL_MONITOR) Used with PREV_HASH_VALUE to identify the last SQL statement executed Used with SQL_HASH_VALUE to identify the last SQL statement executed

PREV_SQL_ADDR PREV_HASH_VALUE PREV_SQL_ID PREV_CHILD_NUMBER PREV_EXEC_START PREV_EXEC_ID PLSQL_ENTRY_OBJECT_ID PLSQL_ENTRY_SUBPROGRAM_ID PLSQL_OBJECT_ID PLSQL_SUBPROGRAM_ID MODULEFoot 1 MODULE_HASH ACTIONFootref 1 ACTION_HASH CLIENT_INFO FIXED_TABLE_SEQUENCE

RAW(4 | 8) NUMBER

VARCHAR2(13) SQL identifier of the last SQL statement executed NUMBER DATE NUMBER NUMBER NUMBER NUMBER NUMBER Child number of the last SQL statement executed SQL execution start of the last executed SQL statement SQL execution identifier of the last executed SQL statement Object ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack Subprogram ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack Object ID of the currently executing PL/SQL subprogram; NULL if executing SQL Subprogram ID of the currently executing PL/SQL object; NULL if executing SQL

VARCHAR2(48) Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure NUMBER Hash value of the MODULE column

VARCHAR2(32) Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure NUMBER Hash value of the ACTION column

VARCHAR2(64) Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure NUMBER This contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions

Column

Datatype

Description have been idle since the last time the performance monitor looked at the database.

ROW_WAIT_OBJ# ROW_WAIT_FILE#

NUMBER NUMBER

Object ID for the table containing the row specified in ROW_WAIT_ROW# Identifier for the datafile containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. Identifier for the block containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. Current row being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. Oracle top level call number Time of logon If the session STATUS is currently ACTIVE, then the value represents the elapsed time (in seconds) since the session has become active. If the session STATUS is currently INACTIVE, then the value represents the elapsed time (in seconds) since the session has become inactive.

ROW_WAIT_BLOCK#

NUMBER

ROW_WAIT_ROW#

NUMBER

TOP_LEVEL_CALL# LOGON_TIME LAST_CALL_ET

NUMBER DATE NUMBER

PDML_ENABLED FAILOVER_TYPE

VARCHAR2(3)

This column has been replaced by the PDML_STATUS column

VARCHAR2(13) Indicates whether and to what extent transparent application failover (TAF) is enabled for the session: NONE - Failover is disabled for this session SESSION - Client is able to fail over its session following a disconnect SELECT - Client is able to fail over queries in progress as well

See Also: FAILOVER_METHOD Oracle Database Concepts for more information on TAF Oracle Database Net Services Administrator's Guide for information on configuring TAF

VARCHAR2(10) Indicates the transparent application failover method for the session: NONE - Failover is disabled for this session BASIC - Client itself reconnects following a disconnect PRECONNECT - Backup instance can support all connections from every instance for which it is backed up

FAILED_OVER RESOURCE_CONSUMER_GROUP PDML_STATUS

VARCHAR2(3)

Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO)

VARCHAR2(32) Name of the session's current resource consumer group VARCHAR2(8) If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force

Column

Datatype

Description PARALLEL DML.

PDDL_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL. If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY. If queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0.

PQ_STATUS

VARCHAR2(8)

CURRENT_QUEUE_DURATION CLIENT_IDENTIFIER BLOCKING_SESSION_STATUS

NUMBER

VARCHAR2(64) Client identifier of the session VARCHAR2(11) This column provides details on whether there is a blocking session: VALID - there is a blocking session, and it is identified in the BLOCKING_INSTANCE and BLOCKING_SESSION columns NO HOLDER - there is no session blocking this session NOT IN WAIT - this session is not in a wait UNKNOWN - the blocking session is unknown

BLOCKING_INSTANCE BLOCKING_SESSION NUMBER NUMBER

Instance identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID. Session identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID.

FINAL_BLOCKING_SESSION_STATUS VARCHAR2(11) The final blocking session is the final element in the wait chain constructed by following the sessions that are blocked by one another starting with this session. In the case of a cyclical wait chain, one of the sessions in the wait chain will be chosen as the final blocker. This column provides details on whether there is a final blocking session: VALID - there is a final blocking session and it is identified in the FINAL_BLOCKING_INSTANCE and FINAL_BLOCKING_SESSION columns NO HOLDER - there is no session blocking this session NOT IN WAIT - this session is not in a wait UNKNOWN - the final blocking session is unknown

FINAL_BLOCKING_INSTANCE NUMBER

Instance identifier of the final blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID. Session identifier of the blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID. A number that uniquely identifies the current or last wait (incremented for each wait) Event number

FINAL_BLOCKING_SESSION

NUMBER

SEQ# EVENT# EVENT

NUMBER NUMBER

VARCHAR2(64) Resource or event for which the session is waiting See Also: Appendix C, "Oracle Wait Events"

Column P1TEXT P1 P1RAW P2TEXT P2 P2RAW P3TEXT P3 P3RAW WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS WAIT_TIME

Datatype

Description

VARCHAR2(64) Description of the first wait event parameter NUMBER RAW(8) First wait event parameter (in decimal) First wait event parameter (in hexadecimal)Foot 2

VARCHAR2(64) Description of the second wait event parameter NUMBER RAW(8) Second wait event parameter (in decimal) Second wait event parameter (in hexadecimal)Footref 2

VARCHAR2(64) Description of the third wait event parameter NUMBER RAW(8) NUMBER NUMBER Third wait event parameter (in decimal) Third wait event parameter (in hexadecimal)Footref 2 Identifier of the class of the wait event Number of the class of the wait event

VARCHAR2(64) Name of the class of the wait event NUMBER If the session is currently waiting, then the value is 0. If the session is not in a wait, then the value is as follows: > 0 - Value is the duration of the last wait in hundredths of a second -1 - Duration of the last wait was less than a hundredth of a second -2 - Parameter TIMED_STATISTICS was set to false

This column has been deprecated in favor of the columns WAIT_TIME_MICRO and STATE. SECONDS_IN_WAIT NUMBER If the session is currently waiting, then the value is the amount of time waited for the current wait. If the session is not in a wait, then the value is the amount of time since the start of the last wait. This column has been deprecated in favor of the columns WAIT_TIME_MICRO and TIME_SINCE_LAST_WAIT_MICRO. STATE VARCHAR2(19) Wait state: WAIT_TIME_MICRO NUMBER WAITING - Session is currently waiting WAITED UNKNOWN TIME - Duration of the last wait is unknown; this is the value when the parameter TIMED_STATISTICS is set to false WAITED SHORT TIME - Last wait was less than a hundredth of a second WAITED KNOWN TIME - Duration of the last wait is specified in the WAIT_TIME column

Amount of time waited (in microseconds). If the session is currently waiting, then the value is the time spent in the current wait. If the session is currently not in a wait, then the value is the amount of time waited in the last wait. Value is interpreted as follows: > 0 - Amount of time remaining for the current wait (in microseconds) 0 - Current wait has timed out -1 - Session can indefinitely wait in the current wait NULL - Session is not currently waiting

TIME_REMAINING_MICRO

NUMBER

Column TIME_SINCE_LAST_WAIT_MICRO SERVICE_NAME SQL_TRACE SQL_TRACE_WAITS SQL_TRACE_BINDS SQL_TRACE_PLAN_STATS

Datatype NUMBER

Description Time elapsed since the end of the last wait (in microseconds). If the session is currently in a wait, then the value is 0.

VARCHAR2(64) Service name of the session VARCHAR2(8) VARCHAR2(5) VARCHAR2(5) Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED) Indicates whether wait tracing is enabled (TRUE) or not (FALSE) Indicates whether bind tracing is enabled (TRUE) or not (FALSE)

VARCHAR2(10) Frequency at which row source statistics are dumped in the trace files for each cursor: never first_execution all_executions NUMBER RAW(4 | 8) NUMBER Shows the value that, in the session, would be reported by sys_context('USERENV', 'SESSION_EDITION_ID') Address of the creating process or circuit Serial number of the creating process or circuit

SESSION_EDITION_ID CREATOR_ADDR CREATOR_SERIAL# ECID

VARCHAR2(64) Execution context identifier (sent by Application Server)

Footnote 1

The datatype of this column is VARCHAR2(64) starting with Oracle Database 11g Release 2 (11.2.0.2).

Footnote 2

The P1RAW, P2RAW, and P3RAW columns display the same values as the P1, P2, and P3 columns, except that the numbers are displayed in hexadecimal. Table 9-2 COMMAND Column of V$SESSION and Corresponding Commands Number
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35

Command
CREATE TABLE SELECT ALTER CLUSTER DELETE CREATE INDEX ALTER INDEX CREATE SEQUENCE ALTER TABLE GRANT OBJECT CREATE SYNONYM CREATE VIEW VALIDATE INDEX ALTER PROCEDURE NO-OP COMMENT NOAUDIT OBJECT DROP DATABASE LINK ALTER DATABASE

Number
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36

Command
INSERT CREATE CLUSTER UPDATE DROP CLUSTER DROP INDEX DROP TABLE ALTER SEQUENCE DROP SEQUENCE REVOKE OBJECT DROP SYNONYM DROP VIEW CREATE PROCEDURE LOCK RENAME AUDIT OBJECT CREATE DATABASE LINK CREATE DATABASE CREATE ROLLBACK SEG

Number
37 39 41 43 45 47 49 51 53 55 57 60 62 64 66 68 71 73 75 77 79 81 83 85 91 93 95 97 99 101 108 110 112 114 116 118 120 122 157 159 161 163 165

Command
ALTER ROLLBACK SEG CREATE TABLESPACE DROP TABLESPACE ALTER USER ROLLBACK PL/SQL EXECUTE ALTER SYSTEM CREATE USER DROP USER SET ROLE CREATE CONTROL FILE ALTER TRIGGER ANALYZE TABLE ANALYZE CLUSTER DROP PROFILE DROP PROCEDURE CREATE MATERIALIZED VIEW LOG DROP MATERIALIZED VIEW LOG ALTER MATERIALIZED VIEW CREATE TYPE ALTER ROLE CREATE TYPE BODY DROP TYPE BODY TRUNCATE TABLE CREATE FUNCTION DROP FUNCTION ALTER PACKAGE CREATE PACKAGE BODY DROP PACKAGE BODY LOGOFF SYSTEM GRANT CREATE PUBLIC SYNONYM CREATE PUBLIC DATABASE LINK GRANT ROLE EXECUTE PROCEDURE ENABLE TRIGGER ENABLE ALL TRIGGERS NETWORK ERROR CREATE DIRECTORY CREATE LIBRARY ALTER JAVA CREATE OPERATOR DROP INDEXTYPE

Number
38 40 42 44 46 48 50 52 54 56 59 61 63 65 67 70 72 74 76 78 80 82 84 86 92 94 96 98 100 102 109 111 113 115 117 119 121 123 158 160 162 164 167

Command
DROP ROLLBACK SEG ALTER TABLESPACE ALTER SESSION COMMIT SAVEPOINT SET TRANSACTION EXPLAIN CREATE ROLE DROP ROLE CREATE SCHEMA CREATE TRIGGER DROP TRIGGER ANALYZE INDEX CREATE PROFILE ALTER PROFILE ALTER RESOURCE COST ALTER MATERIALIZED VIEW LOG CREATE MATERIALIZED VIEW DROP MATERIALIZED VIEW DROP TYPE ALTER TYPE ALTER TYPE BODY DROP LIBRARY TRUNCATE CLUSTER ALTER FUNCTION CREATE PACKAGE DROP PACKAGE ALTER PACKAGE BODY LOGON LOGOFF BY CLEANUP SYSTEM REVOKE DROP PUBLIC SYNONYM DROP PUBLIC DATABASE LINK REVOKE ROLE USER COMMENT DISABLE TRIGGER DISABLE ALL TRIGGERS EXECUTE TYPE DROP DIRECTORY CREATE JAVA DROP JAVA CREATE INDEXTYPE DROP OPERATOR

Number
168 170 172 174 176 178 180 182

Command
ASSOCIATE STATISTICS CALL METHOD ALTER SUMMARY CREATE DIMENSION DROP DIMENSION DROP CONTEXT CREATE OUTLINE UPDATE INDEXES

Number
169 171 173 175 177 179 181 183

Command
DISASSOCIATE STATISTICS CREATE SUMMARY DROP SUMMARY ALTER DIMENSION CREATE CONTEXT ALTER OUTLINE DROP OUTLINE ALTER OPERATOR

You might also like