Top 20 dictionary views

1. V$SESSION

V$SESSION displays session information for each current session.


Column Datatype Description
SADDR RAW(4 | 8) Session address
SID NUMBER Session identifier
SERIAL# NUMBER 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.
AUDSID NUMBER Auditing session ID
PADDR RAW(4 | 8) Address of the process that owns the session
USER# NUMBER Oracle user identifier
USERNAME VARCHAR2(30) Oracle username
COMMAND 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.
OWNERID NUMBER 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 4-byte value. The low-order 2 bytes represent the session number and the high-order bytes represent the instance ID of the query coordinator.

TADDR VARCHAR2(8) Address of the transaction state object
LOCKWAIT VARCHAR2(8) Address of the lock the session is waiting for; NULL if none
STATUS VARCHAR2(8) 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# NUMBER Schema user identifier
SCHEMANAME VARCHAR2(30) Schema user name
OSUSER VARCHAR2(30) Operating system client user name
PROCESS VARCHAR2(24) Operating system client process ID
MACHINE VARCHAR2(64) Operating system machine name
PORT NUMBER Client port number
TERMINAL VARCHAR2(30) Operating system terminal name
PROGRAM VARCHAR2(48) Operating system program name
TYPE VARCHAR2(10) Session type
SQL_ADDRESS RAW(4 | 8) Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed
SQL_HASH_VALUE NUMBER Used with SQL_ADDRESS to identify the SQL statement that is currently being executed
SQL_ID VARCHAR2(13) SQL identifier of the SQL statement that is currently being executed
SQL_CHILD_NUMBER NUMBER Child number of the SQL statement that is currently being executed
SQL_EXEC_START DATE Time when the execution of the SQL currently executed by this session started; NULL if SQL_ID is NULL
SQL_EXEC_ID NUMBER SQL execution identifier; NULL if SQL_ID is NULL or if the execution of that SQL has not yet started (see V$SQL_MONITOR)
PREV_SQL_ADDR RAW(4 | 8) Used with PREV_HASH_VALUE to identify the last SQL statement executed
PREV_HASH_VALUE NUMBER Used with SQL_HASH_VALUE to identify the last SQL statement executed
PREV_SQL_ID VARCHAR2(13) SQL identifier of the last SQL statement executed
PREV_CHILD_NUMBER NUMBER Child number of the last SQL statement executed
PREV_EXEC_START DATE SQL execution start of the last executed SQL statement
PREV_EXEC_ID NUMBER SQL execution identifier of the last executed SQL statement
PLSQL_ENTRY_OBJECT_ID NUMBER Object ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack
PLSQL_ENTRY_SUBPROGRAM_ID NUMBER Subprogram ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack
PLSQL_OBJECT_ID NUMBER Object ID of the currently executing PL/SQL subprogram; NULL if executing SQL
PLSQL_SUBPROGRAM_ID NUMBER Subprogram ID of the currently executing PL/SQL object; NULL if executing SQL
MODULEFoot 1  VARCHAR2(48) Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure
MODULE_HASH NUMBER Hash value of the MODULE column
ACTIONFootref 1 VARCHAR2(32) Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure
ACTION_HASH NUMBER Hash value of the ACTION column
CLIENT_INFO VARCHAR2(64) Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure
FIXED_TABLE_SEQUENCE 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 have been idle since the last time the performance monitor looked at the database.
ROW_WAIT_OBJ# NUMBER Object ID for the table containing the row specified in ROW_WAIT_ROW#
ROW_WAIT_FILE# NUMBER 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.
ROW_WAIT_BLOCK# NUMBER 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.
ROW_WAIT_ROW# NUMBER 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.
TOP_LEVEL_CALL# NUMBER Oracle top level call number
LOGON_TIME DATE Time of logon
LAST_CALL_ET NUMBER 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.

PDML_ENABLED VARCHAR2(3) This column has been replaced by the PDML_STATUS column
FAILOVER_TYPE 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 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 VARCHAR2(3) Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO)
RESOURCE_CONSUMER_GROUP VARCHAR2(32) Name of the session's current resource consumer group
PDML_STATUS 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 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.
PQ_STATUS VARCHAR2(8) 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.
CURRENT_QUEUE_DURATION NUMBER If queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0.
CLIENT_IDENTIFIER VARCHAR2(64) Client identifier of the session
BLOCKING_SESSION_STATUS 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 NUMBER Instance identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID.
BLOCKING_SESSION NUMBER 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.
FINAL_BLOCKING_SESSION NUMBER Session identifier of the blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID.
SEQ# NUMBER A number that uniquely identifies the current or last wait (incremented for each wait)
EVENT# NUMBER Event number
EVENT VARCHAR2(64) Resource or event for which the session is waiting

See Also: Appendix C, "Oracle Wait Events"

P1TEXT VARCHAR2(64) Description of the first wait event parameter
P1 NUMBER First wait event parameter (in decimal)
P1RAW RAW(8) First wait event parameter (in hexadecimal)Foot 2 
P2TEXT VARCHAR2(64) Description of the second wait event parameter
P2 NUMBER Second wait event parameter (in decimal)
P2RAW RAW(8) Second wait event parameter (in hexadecimal)Footref 2
P3TEXT VARCHAR2(64) Description of the third wait event parameter
P3 NUMBER Third wait event parameter (in decimal)
P3RAW RAW(8) Third wait event parameter (in hexadecimal)Footref 2
WAIT_CLASS_ID NUMBER Identifier of the class of the wait event
WAIT_CLASS# NUMBER Number of the class of the wait event
WAIT_CLASS VARCHAR2(64) Name of the class of the wait event
WAIT_TIME 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:
  • 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

WAIT_TIME_MICRO NUMBER 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.
TIME_REMAINING_MICRO NUMBER 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_SINCE_LAST_WAIT_MICRO NUMBER Time elapsed since the end of the last wait (in microseconds). If the session is currently in a wait, then the value is 0.
SERVICE_NAME VARCHAR2(64) Service name of the session
SQL_TRACE VARCHAR2(8) Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED)
SQL_TRACE_WAITS VARCHAR2(5) Indicates whether wait tracing is enabled (TRUE) or not (FALSE)
SQL_TRACE_BINDS VARCHAR2(5) Indicates whether bind tracing is enabled (TRUE) or not (FALSE)
SQL_TRACE_PLAN_STATS VARCHAR2(10) Frequency at which row source statistics are dumped in the trace files for each cursor:
  • never

  • first_execution

  • all_executions

SESSION_EDITION_ID NUMBER Shows the value that, in the session, would be reported by sys_context('USERENV', 'SESSION_EDITION_ID')
CREATOR_ADDR RAW(4 | 8) Address of the creating process or circuit
CREATOR_SERIAL# NUMBER Serial number of the creating process or circuit
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 Command Number Command

1

CREATE TABLE

2

INSERT

3

SELECT

4

CREATE CLUSTER

5

ALTER CLUSTER

6

UPDATE

7

DELETE

8

DROP CLUSTER

9

CREATE INDEX

10

DROP INDEX

11

ALTER INDEX

12

DROP TABLE

13

CREATE SEQUENCE

14

ALTER SEQUENCE

15

ALTER TABLE

16

DROP SEQUENCE

17

GRANT OBJECT

18

REVOKE OBJECT

19

CREATE SYNONYM

20

DROP SYNONYM

21

CREATE VIEW

22

DROP VIEW

23

VALIDATE INDEX

24

CREATE PROCEDURE

25

ALTER PROCEDURE

26

LOCK

27

NO-OP

28

RENAME

29

COMMENT

30

AUDIT OBJECT

31

NOAUDIT OBJECT

32

CREATE DATABASE LINK

33

DROP DATABASE LINK

34

CREATE DATABASE

35

ALTER DATABASE

36

CREATE ROLLBACK SEG

37

ALTER ROLLBACK SEG

38

DROP ROLLBACK SEG

39

CREATE TABLESPACE

40

ALTER TABLESPACE

41

DROP TABLESPACE

42

ALTER SESSION

43

ALTER USER

44

COMMIT

45

ROLLBACK

46

SAVEPOINT

47

PL/SQL EXECUTE

48

SET TRANSACTION

49

ALTER SYSTEM

50

EXPLAIN

51

CREATE USER

52

CREATE ROLE

53

DROP USER

54

DROP ROLE

55

SET ROLE

56

CREATE SCHEMA

57

CREATE CONTROL FILE

59

CREATE TRIGGER

60

ALTER TRIGGER

61

DROP TRIGGER

62

ANALYZE TABLE

63

ANALYZE INDEX

64

ANALYZE CLUSTER

65

CREATE PROFILE

66

DROP PROFILE

67

ALTER PROFILE

68

DROP PROCEDURE

70

ALTER RESOURCE COST

71

CREATE MATERIALIZED VIEW LOG

72

ALTER MATERIALIZED VIEW LOG

73

DROP MATERIALIZED VIEW LOG

74

CREATE MATERIALIZED VIEW

75

ALTER MATERIALIZED VIEW

76

DROP MATERIALIZED VIEW

77

CREATE TYPE

78

DROP TYPE

79

ALTER ROLE

80

ALTER TYPE

81

CREATE TYPE BODY

82

ALTER TYPE BODY

83

DROP TYPE BODY

84

DROP LIBRARY

85

TRUNCATE TABLE

86

TRUNCATE CLUSTER

91

CREATE FUNCTION

92

ALTER FUNCTION

93

DROP FUNCTION

94

CREATE PACKAGE

95

ALTER PACKAGE

96

DROP PACKAGE

97

CREATE PACKAGE BODY

98

ALTER PACKAGE BODY

99

DROP PACKAGE BODY

100

LOGON

101

LOGOFF

102

LOGOFF BY CLEANUP

108

SYSTEM GRANT

109

SYSTEM REVOKE

110

CREATE PUBLIC SYNONYM

111

DROP PUBLIC SYNONYM

112

CREATE PUBLIC DATABASE LINK

113

DROP PUBLIC DATABASE LINK

114

GRANT ROLE

115

REVOKE ROLE

116

EXECUTE PROCEDURE

117

USER COMMENT

118

ENABLE TRIGGER

119

DISABLE TRIGGER

120

ENABLE ALL TRIGGERS

121

DISABLE ALL TRIGGERS

122

NETWORK ERROR

123

EXECUTE TYPE

157

CREATE DIRECTORY

158

DROP DIRECTORY

159

CREATE LIBRARY

160

CREATE JAVA

161

ALTER JAVA

162

DROP JAVA

163

CREATE OPERATOR

164

CREATE INDEXTYPE

165

DROP INDEXTYPE

167

DROP OPERATOR

168

ASSOCIATE STATISTICS

169

DISASSOCIATE STATISTICS

170

CALL METHOD

171

CREATE SUMMARY

172

ALTER SUMMARY

173

DROP SUMMARY

174

CREATE DIMENSION

175

ALTER DIMENSION

176

DROP DIMENSION

177

CREATE CONTEXT

178

DROP CONTEXT

179

ALTER OUTLINE

180

CREATE OUTLINE

181

DROP OUTLINE

182

UPDATE INDEXES

183

ALTER OPERATOR



V$SQLAREA

posted May 6, 2012, 7:02 AM by Sachchida Ojha

V$SQLAREA displays statistics on shared SQL areas and contains one row per SQL string. It provides statistics on SQL statements that are in memory, parsed, and ready for execution.

Column Datatype Description
SQL_TEXT VARCHAR2(1000) First thousand characters of the SQL text for the current cursor
SQL_FULLTEXT CLOB All characters of the SQL text for the current cursor
SQL_ID VARCHAR2(13) SQL identifier of the parent cursor in the library cache
SHARABLE_MEM NUMBER Amount of shared memory used by a cursor. If multiple child cursors exist, then the sum of all shared memory used by all child cursors.
PERSISTENT_MEM NUMBER Fixed amount of memory used for the lifetime of an open cursor. If multiple child cursors exist, then the fixed sum of memory used for the lifetime of all the child cursors.
RUNTIME_MEM NUMBER Fixed amount of memory required during execution of a cursor. If multiple child cursors exist, then the fixed sum of all memory required during execution of all the child cursors.
SORTS NUMBER Sum of the number of sorts that were done for all the child cursors
VERSION_COUNT NUMBER Number of child cursors that are present in the cache under this parent
LOADED_VERSIONS NUMBER Number of child cursors that are present in the cache and have their context heap loaded
OPEN_VERSIONS NUMBER Number of child cursors that are currently open under this current parent
USERS_OPENING NUMBER Number of users that have any of the child cursors open
FETCHES NUMBER Number of fetches associated with the SQL statement
EXECUTIONS NUMBER Total number of executions, totalled over all the child cursors
PX_SERVERS_EXECUTIONS NUMBER Total number of executions performed by parallel execution servers (0 when the statement has never been executed in parallel)
END_OF_FETCH_COUNT NUMBER Number of times this cursor was fully executed since the cursor was brought into the library cache. The value of this statistic is not incremented when the cursor is partially executed, either because it failed during the execution or because only the first few rows produced by this cursor are fetched before the cursor is closed or re-executed. By definition, the value of the END_OF_FETCH_COUNT column should be less or equal to the value of the EXECUTIONS column.
USERS_EXECUTING NUMBER Total number of users executing the statement over all child cursors
LOADS NUMBER Number of times the object was loaded or reloaded
FIRST_LOAD_TIME VARCHAR2(19) Timestamp of the parent creation time
INVALIDATIONS NUMBER Total number of invalidations over all the child cursors
PARSE_CALLS NUMBER Sum of all parse calls to all the child cursors under this parent
DISK_READS NUMBER Sum of the number of disk reads over all child cursors
DIRECT_WRITES NUMBER Sum of the number of direct writes over all child cursors
BUFFER_GETS NUMBER Sum of buffer gets over all child cursors
APPLICATION_WAIT_TIME NUMBER Application wait time (in microseconds)
CONCURRENCY_WAIT_TIME NUMBER Concurrency wait time (in microseconds)
CLUSTER_WAIT_TIME NUMBER Cluster wait time (in microseconds)
USER_IO_WAIT_TIME NUMBER User I/O Wait Time (in microseconds)
PLSQL_EXEC_TIME NUMBER PL/SQL execution time (in microseconds)
JAVA_EXEC_TIME NUMBER Java execution time (in microseconds)
ROWS_PROCESSED NUMBER Total number of rows processed on behalf of this SQL statement
COMMAND_TYPE NUMBER Oracle command type definition
OPTIMIZER_MODE VARCHAR2(10) Mode under which the SQL statement was executed
OPTIMIZER_COST NUMBER Cost of this query given by the optimizer
OPTIMIZER_ENV RAW(2000) Optimizer environment
OPTIMIZER_ENV_HASH_VALUE NUMBER Hash value for the optimizer environment
PARSING_USER_ID NUMBER User ID of the user that has parsed the very first cursor under this parent
PARSING_SCHEMA_ID NUMBER Schema ID that was used to parse this child cursor
PARSING_SCHEMA_NAME VARCHAR2(30) Schema name that was used to parse this child cursor
KEPT_VERSIONS NUMBER Number of child cursors that have been marked to be kept using the DBMS_SHARED_POOL package
ADDRESS RAW(4 | 8) Address of the handle to the parent for this cursor
HASH_VALUE NUMBER Hash value of the parent statement in the library cache
OLD_HASH_VALUE NUMBER Old SQL hash value
PLAN_HASH_VALUE NUMBER Numeric representation of the SQL plan for this cursor. Comparing one PLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line).
MODULE VARCHAR2(64) Contains the name of the module that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASH NUMBER Hash value of the module that is named in the MODULE column
ACTION VARCHAR2(64) Contains the name of the action that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASH NUMBER Hash value of the action that is named in the ACTION column
SERIALIZABLE_ABORTS NUMBER Number of times the transaction failed to serialize, producing ORA-08177 errors, totalled over all the child cursors
OUTLINE_CATEGORY VARCHAR2(64) If an outline was applied during construction of the cursor, then this column displays the category of that outline. Otherwise the column is left blank.
CPU_TIME NUMBER CPU time (in microseconds) used by this cursor for parsing, executing, and fetching
ELAPSED_TIME NUMBER Elapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
OUTLINE_SID VARCHAR2(40) Outline session identifier
LAST_ACTIVE_CHILD_ADDRESS RAW(4 | 8) Address (identifier) of the child cursor that was the last to be active in the group (that is, the child cursor on behalf of which statistics in V$SQL were updated)
REMOTE VARCHAR2(1) Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUS VARCHAR2(19) Status of the cursor:
  • VALID - Valid, authorized without errors

  • VALID_AUTH_ERROR - Valid, authorized with authorization errors

  • VALID_COMPILE_ERROR - Valid, authorized with compilation errors

  • VALID_UNAUTH - Valid, unauthorized

  • INVALID_UNAUTH - Invalid, unauthorized

  • INVALID - Invalid, unauthorized but keep the timestamp

LITERAL_HASH_VALUE NUMBER Hash value of the literals which are replaced with system-generated bind variables and are to be matched, when CURSOR_SHARING is used. This is not the hash value for the SQL statement. If CURSOR_SHARING is not used, then the value is 0.
LAST_LOAD_TIME DATE Time at which the query plan was loaded into the library cache
IS_OBSOLETE VARCHAR2(1) Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
IS_BIND_SENSITIVE VARCHAR2(1) Indicates whether the cursor is bind sensitive (Y) or not (N). A query is considered bind-sensitive if the optimizer peeked at one of its bind variable values when computing predicate selectivities and where a change in a bind variable value may cause the optimizer to generate a different plan.
IS_BIND_AWARE VARCHAR2(1) Indicates whether the cursor is bind aware (Y) or not (N). A query is considered bind-aware if it has been marked to use extended cursor sharing. The query would already have been marked as bind-sensitive.
CHILD_LATCH NUMBER Child latch number that is protecting the cursor. This column is obsolete and maintained for backward compatibility.
SQL_PROFILE VARCHAR2(64) SQL profile used for this statement, if any
SQL_PATCH VARCHAR2(30) SQL patch used for this statement, if any
SQL_PLAN_BASELINE VARCHAR2(30) SQL plan baseline used for this statement, if any
PROGRAM_ID NUMBER Program identifier
PROGRAM_LINE# NUMBER Program line number
EXACT_MATCHING_SIGNATURE NUMBER Signature used when the CURSOR_SHARING parameter is set to EXACT
FORCE_MATCHING_SIGNATURE NUMBER Signature used when the CURSOR_SHARING parameter is set to FORCE
LAST_ACTIVE_TIME DATE Time at which the query plan was last active
BIND_DATA RAW(2000) Bind data
TYPECHECK_MEM NUMBER Typecheck memory
IO_CELL_OFFLOAD_ELIGIBLE_BYTES NUMBER Number of I/O bytes which can be filtered by the Exadata storage system

See Also: Oracle Exadata Storage Server Software documentation for more information

IO_INTERCONNECT_BYTES NUMBER Number of I/O bytes exchanged between Oracle Database and the storage system
PHYSICAL_READ_REQUESTS NUMBER Number of physical read I/O requests issued by the monitored SQL
PHYSICAL_READ_BYTES NUMBER Number of bytes read from disks by the monitored SQL
PHYSICAL_WRITE_REQUESTS NUMBER Number of physical write I/O requests issued by the monitored SQL
PHYSICAL_WRITE_BYTES NUMBER Number of bytes written to disks by the monitored SQL
OPTIMIZED_PHY_READ_REQUESTS NUMBER Number of physical read I/O requests from Database Smart Flash Cache issued by the monitored SQL
LOCKED_TOTAL NUMBER Total number of times the child cursor has been locked
PINNED_TOTAL NUMBER Total number of times the child cursor has been pinned
IO_CELL_UNCOMPRESSED_BYTES NUMBER Number of uncompressed bytes (that is, size after decompression) that are offloaded to the Exadata cells

See Also: Oracle Exadata Storage Server Software documentation for more information

IO_CELL_OFFLOAD_RETURNED_BYTES NUMBER Number of bytes that are returned by Exadata cell through the regular I/O path

See Also: Oracle Exadata Storage Server Software documentation for more information

V$SQL

posted May 6, 2012, 6:59 AM by Sachchida Ojha   [ updated May 6, 2012, 6:59 AM ]

V$SQL lists statistics on shared SQL areas without the GROUP BY clause and contains one row for each child of the original SQL text entered. Statistics displayed in V$SQL are normally updated at the end of query execution. However, for long running queries, they are updated every 5 seconds. This makes it easy to see the impact of long running SQL statements while they are still in progress.

Column Datatype Description
SQL_TEXT VARCHAR2(1000) First thousand characters of the SQL text for the current cursor
SQL_FULLTEXT CLOB Full text for the SQL statement exposed as a CLOB column. The full text of a SQL statement can be retrieved using this column instead of joining with the V$SQLTEXT dynamic performance view.
SQL_ID VARCHAR2(13) SQL identifier of the parent cursor in the library cache
SHARABLE_MEM NUMBER Amount of shared memory used by the child cursor (in bytes)
PERSISTENT_MEM NUMBER Fixed amount of memory used for the lifetime of the child cursor (in bytes)
RUNTIME_MEM NUMBER Fixed amount of memory required during the execution of the child cursor
SORTS NUMBER Number of sorts that were done for the child cursor
LOADED_VERSIONS NUMBER Indicates whether the context heap is loaded (1) or not (0)
OPEN_VERSIONS NUMBER Indicates whether the child cursor is locked (1) or not (0)
USERS_OPENING NUMBER Number of users executing the statement
FETCHES NUMBER Number of fetches associated with the SQL statement
EXECUTIONS NUMBER Number of executions that took place on this object since it was brought into the library cache
PX_SERVERS_EXECUTIONS NUMBER Total number of executions performed by parallel execution servers (0 when the statement has never been executed in parallel)
END_OF_FETCH_COUNT NUMBER Number of times this cursor was fully executed since the cursor was brought into the library cache. The value of this statistic is not incremented when the cursor is partially executed, either because it failed during the execution or because only the first few rows produced by this cursor are fetched before the cursor is closed or re-executed. By definition, the value of the END_OF_FETCH_COUNT column should be less or equal to the value of the EXECUTIONS column.
USERS_EXECUTING NUMBER Number of users executing the statement
LOADS NUMBER Number of times the object was either loaded or reloaded
FIRST_LOAD_TIME VARCHAR2(19) Timestamp of the parent creation time
INVALIDATIONS NUMBER Number of times this child cursor has been invalidated
PARSE_CALLS NUMBER Number of parse calls for this child cursor
DISK_READS NUMBER Number of disk reads for this child cursor
DIRECT_WRITES NUMBER Number of direct writes for this child cursor
BUFFER_GETS NUMBER Number of buffer gets for this child cursor
APPLICATION_WAIT_TIME NUMBER Application wait time (in microseconds)
CONCURRENCY_WAIT_TIME NUMBER Concurrency wait time (in microseconds)
CLUSTER_WAIT_TIME NUMBER Cluster wait time (in microseconds)
USER_IO_WAIT_TIME NUMBER User I/O Wait Time (in microseconds)
PLSQL_EXEC_TIME NUMBER PL/SQL execution time (in microseconds)
JAVA_EXEC_TIME NUMBER Java execution time (in microseconds)
ROWS_PROCESSED NUMBER Total number of rows the parsed SQL statement returns
COMMAND_TYPE NUMBER Oracle command type definition
OPTIMIZER_MODE VARCHAR2(10) Mode under which the SQL statement was executed
OPTIMIZER_COST NUMBER Cost of this query given by the optimizer
OPTIMIZER_ENV RAW(2000) Optimizer environment
OPTIMIZER_ENV_HASH_VALUE NUMBER Hash value for the optimizer environment
PARSING_USER_ID NUMBER User ID of the user who originally built this child cursor
PARSING_SCHEMA_ID NUMBER Schema ID that was used to originally build this child cursor
PARSING_SCHEMA_NAME VARCHAR2(30) Schema name that was used to originally build this child cursor
KEPT_VERSIONS NUMBER Indicates whether this child cursor has been marked to be kept pinned in the cache using the DBMS_SHARED_POOL package
ADDRESS RAW(4 | 8) Address of the handle to the parent for this cursor
TYPE_CHK_HEAP RAW(4) Descriptor of the type check heap for this child cursor
HASH_VALUE NUMBER Hash value of the parent statement in the library cache
OLD_HASH_VALUE NUMBER Old SQL hash value
PLAN_HASH_VALUE NUMBER Numeric representation of the SQL plan for this cursor. Comparing one PLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line).
CHILD_NUMBER NUMBER Number of this child cursor
SERVICE VARCHAR2(64) Service name
SERVICE_HASH NUMBER Hash value for the name listed in the SERVICEcolumn
MODULE VARCHAR2(64) Contains the name of the module that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASH NUMBER Hash value of the module listed in the MODULE column
ACTION VARCHAR2(64) Contains the name of the action that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASH NUMBER Hash value of the action listed in the ACTION column
SERIALIZABLE_ABORTS NUMBER Number of times the transaction failed to serialize, producing ORA-08177 errors, per cursor
OUTLINE_CATEGORY VARCHAR2(64) If an outline was applied during construction of the cursor, then this column displays the category of that outline. Otherwise the column is left blank.
CPU_TIME NUMBER CPU time (in microseconds) used by this cursor for parsing, executing, and fetching
ELAPSED_TIME NUMBER Elapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
OUTLINE_SID NUMBER Outline session identifier
CHILD_ADDRESS RAW(4 | 8) Address of the child cursor
SQLTYPE NUMBER Denotes the version of the SQL language used for this statement
REMOTE VARCHAR2(1) Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUS VARCHAR2(19) Status of the cursor:
  • VALID - Valid, authorized without errors

  • VALID_AUTH_ERROR - Valid, authorized with authorization errors

  • VALID_COMPILE_ERROR - Valid, authorized with compilation errors

  • VALID_UNAUTH - Valid, unauthorized

  • INVALID_UNAUTH - Invalid, unauthorized

  • INVALID - Invalid, unauthorized but keep the timestamp

LITERAL_HASH_VALUE NUMBER Hash value of the literals which are replaced with system-generated bind variables and are to be matched, when CURSOR_SHARING is used. This is not the hash value for the SQL statement. If CURSOR_SHARING is not used, then the value is 0.
LAST_LOAD_TIME VARCHAR2(19) Time at which the query plan was loaded into the library cache
IS_OBSOLETE VARCHAR2(1) Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
IS_BIND_SENSITIVE VARCHAR2(1) Indicates whether the cursor is bind sensitive (Y) or not (N). A query is considered bind-sensitive if the optimizer peeked at one of its bind variable values when computing predicate selectivities and where a change in a bind variable value may cause the optimizer to generate a different plan.
IS_BIND_AWARE VARCHAR2(1) Indicates whether the cursor is bind aware (Y) or not (N). A query is considered bind-aware if it has been marked to use extended cursor sharing. The query would already have been marked as bind-sensitive.
IS_SHAREABLE VARCHAR2(1) Indicates whether the cursor can be shared (Y) or not (N)
CHILD_LATCH NUMBER Child latch number that is protecting the cursor. This column is obsolete and maintained for backward compatibility.
SQL_PROFILE VARCHAR2(64) SQL profile used for this statement, if any
SQL_PATCH VARCHAR2(30) SQL patch used for this statement, if any
SQL_PLAN_BASELINE VARCHAR2(30) SQL plan baseline used for this statement, if any
PROGRAM_ID NUMBER Program identifier
PROGRAM_LINE# NUMBER Program line number
EXACT_MATCHING_SIGNATURE NUMBER Signature calculated on the normalized SQL text. The normalization includes the removal of white space and the uppercasing of all non-literal strings.
FORCE_MATCHING_SIGNATURE NUMBER Signature used when the CURSOR_SHARING parameter is set to FORCE
LAST_ACTIVE_TIME DATE TIme at which the query plan was last active
BIND_DATA RAW(2000) Bind data
TYPECHECK_MEM NUMBER Typecheck memory
IO_CELL_OFFLOAD_ELIGIBLE_BYTES NUMBER Number of I/O bytes which can be filtered by the Exadata storage system

See Also: Oracle Exadata Storage Server Software documentation for more information

IO_INTERCONNECT_BYTES NUMBER Number of I/O bytes exchanged between Oracle Database and the storage system
PHYSICAL_READ_REQUESTS NUMBER Number of physical read I/O requests issued by the monitored SQL
PHYSICAL_READ_BYTES NUMBER Number of bytes read from disks by the monitored SQL
PHYSICAL_WRITE_REQUESTS NUMBER Number of physical write I/O requests issued by the monitored SQL
PHYSICAL_WRITE_BYTES NUMBER Number of bytes written to disks by the monitored SQL
OPTIMIZED_PHY_READ_REQUESTS NUMBER Number of physical read I/O requests from Database Smart Flash Cache issued by the monitored SQL
LOCKED_TOTAL NUMBER Total number of times the child cursor has been locked
PINNED_TOTAL NUMBER Total number of times the child cursor has been pinned
IO_CELL_UNCOMPRESSED_BYTES NUMBER Number of uncompressed bytes (that is, size after decompression) that are offloaded to the Exadata cells

See Also: Oracle Exadata Storage Server Software documentation for more information

IO_CELL_OFFLOAD_RETURNED_BYTES NUMBER Number of bytes that are returned by Exadata cell through the regular I/O path

See Also: Oracle Exadata Storage Server Software documentation for more information

V$PROCESS

posted May 6, 2012, 6:51 AM by Sachchida Ojha

V$PROCESS displays information about the currently active processes. While the LATCHWAIT column indicates what latch a process is waiting for, the LATCHSPIN column indicates what latch a process is spinning on. On multi-processor machines, Oracle processes will spin on a latch before waiting on it.

Column Datatype Description
ADDR RAW(4 | 8) Address of the process state object
PID NUMBER Oracle process identifier
SPID VARCHAR2(24) Operating system process identifier
PNAME VARCHAR2(5) Name of this process
USERNAME VARCHAR2(15) Operating system process username

Note: Any two-task user coming across the network has "-T" appended to the username.

SERIAL# NUMBER Process serial number
TERMINAL VARCHAR2(30) Operating system terminal identifier
PROGRAM VARCHAR2(48) Program in progress
TRACEID VARCHAR2(255) Trace file identifier
TRACEFILE VARCHAR2(513) Trace file name of the process
BACKGROUND VARCHAR2(1) 1 for a background process; NULL for a normal process
LATCHWAIT VARCHAR2(8) Address of the latch the process is waiting for; NULL if none
LATCHSPIN VARCHAR2(8) Address of the latch the process is spinning on; NULL if none
PGA_USED_MEM NUMBER PGA memory currently used by the process
PGA_ALLOC_MEM NUMBER PGA memory currently allocated by the process (including free PGA memory not yet released to the operating system by the server process)
PGA_FREEABLE_MEM NUMBER Allocated PGA memory which can be freed
PGA_MAX_MEM NUMBER Maximum PGA memory ever allocated by the process

1-3 of 3