Oracle Reference
Oracle Reference
Data Dictionary Views
DBA_AUDIT_TRAIL
DBA_AUDIT_TRAIL
displays all standard audit trail entries.
Related View
USER_AUDIT_TRAIL
displays the standard audit trail entries related to the current user.
Column | Datatype | NULL | Description |
---|---|---|---|
OS_USERNAME | VARCHAR2(255) | Operating system login username of the user whose actions were audited | |
USERNAME | VARCHAR2(30) | Name (not ID number) of the user whose actions were audited | |
USERHOST | VARCHAR2(128) | Client host machine name | |
TERMINAL | VARCHAR2(255) | Identifier of the user's terminal | |
TIMESTAMP | DATE | Date and time of the creation of the audit trail entry (date and time of user login for entries created by AUDIT SESSION ) in the local database session time zone | |
OWNER | VARCHAR2(30) | Creator of the object affected by the action | |
OBJ_NAME | VARCHAR2(128) | Name of the object affected by the action | |
ACTION | NUMBER | NOT NULL | Numeric action type code. The corresponding name of the action type is in the ACTION_NAME column. |
ACTION_NAME | VARCHAR2(28) | Name of the action type corresponding to the numeric code in the ACTION column | |
NEW_OWNER | VARCHAR2(30) | Owner of the object named in the NEW_NAME column | |
NEW_NAME | VARCHAR2(128) | New name of the object after a RENAME or the name of the underlying object | |
OBJ_PRIVILEGE | VARCHAR2(16) | Object privileges granted or revoked by a GRANT or REVOKE statement | |
SYS_PRIVILEGE | VARCHAR2(40) | System privileges granted or revoked by a GRANT or REVOKE statement | |
ADMIN_OPTION | VARCHAR2(1) | Indicates whether the role or system privilege was granted with the ADMIN option | |
GRANTEE | VARCHAR2(30) | Name of the grantee specified in a GRANT or REVOKE statement | |
AUDIT_OPTION | VARCHAR2(40) | Auditing option set with the AUDIT statement | |
SES_ACTIONS | VARCHAR2(19) | Session summary (a string of 16 characters, one for each action type in the order ALTER , AUDIT , COMMENT , DELETE , GRANT , INDEX , INSERT , LOCK , RENAME , SELECT , UPDATE , REFERENCES , and EXECUTE ). Positions 14, 15, and 16 are reserved for future use. The characters are:- - NoneS - SuccessF - FailureB - Both | |
LOGOFF_TIME | DATE | Date and time of user log off | |
LOGOFF_LREAD | NUMBER | Logical reads for the session | |
LOGOFF_PREAD | NUMBER | Physical reads for the session | |
LOGOFF_LWRITE | NUMBER | Logical writes for the session | |
LOGOFF_DLOCK | VARCHAR2(40) | Deadlocks detected during the session | |
COMMENT_TEXT | VARCHAR2(4000) | Text comment on the audit trail entry, providing more information about the statement auditedAlso indicates how the user was authenticated. The method can be one of the following:DATABASE - Authentication was done by passwordNETWORK - Authentication was done by Oracle Net Services or the Advanced Security optionPROXY - Client was authenticated by another user; the name of the proxy user follows the method type | |
SESSIONID | NUMBER | NOT NULL | Numeric ID for each Oracle session. Each user session gets a unique session ID. |
ENTRYID | NUMBER | NOT NULL | Numeric ID for each audit trail entry in the session. The entry ID is an index of a session's audit entries that starts at 1 and increases to the number of entries that are written. |
STATEMENTID | NUMBER | NOT NULL | nth statement in the user session. The first SQL statement gets a value of 1 and the value is incremented for each subsequent SQL statement. Note that one SQL statement can create more than one audit trail entry (for example, when more than one object is audited from the same SQL statement), and in this case the statement ID remains the same for that statement and the entry ID increases for each audit trail entry created by the statement. |
RETURNCODE | NUMBER | NOT NULL | Oracle error code generated by the action. Some useful values:0 - Action succeeded2004 - Security violation |
PRIV_USED | VARCHAR2(40) | System privilege used to execute the action | |
CLIENT_ID | VARCHAR2(64) | Client identifier in each Oracle session | |
ECONTEXT_ID | VARCHAR2(64) | Application execution context identifier | |
SESSION_CPU | NUMBER | Amount of CPU time used by each Oracle session | |
EXTENDED_TIMESTAMP | TIMESTAMP(6) WITH TIME ZONE | Timestamp of the creation of the audit trail entry (timestamp of user login for entries created by AUDIT SESSION ) in UTC (Coordinated Universal Time) time zone | |
PROXY_SESSIONID | NUMBER | Proxy session serial number, if an enterprise user has logged in through the proxy mechanism | |
GLOBAL_UID | VARCHAR2(32) | Global user identifier for the user, if the user has logged in as an enterprise user | |
INSTANCE_NUMBER | NUMBER | Instance number as specified by the INSTANCE_NUMBER initialization parameter | |
OS_PROCESS | VARCHAR2(16) | Operating System process identifier of the Oracle process | |
TRANSACTIONID | RAW(8) | Transaction identifier of the transaction in which the object is accessed or modified | |
SCN | NUMBER | System change number (SCN) of the query | |
SQL_BIND | NVARCHAR2(2000) | Bind variable data of the query | |
SQL_TEXT | NVARCHAR2(2000) | SQL text of the query | |
OBJ_EDITION_NAME | VARCHAR2(30) | Name of the edition containing the audited object | |
DBID | NUMBER | Database identifier of the audited database |
Note:
The SQL_BIND
and SQL_TEXT
columns are only populated if the AUDIT_TRAIL
initialization parameter is set to db
, extended
.
DBA_DATA_FILES
DBA_DATA_FILES
describes database files.
Column | Datatype | NULL | Description |
---|---|---|---|
FILE_NAME | VARCHAR2(513) | Name of the database file | |
FILE_ID | NUMBER | NOT NULL | File identifier number of the database file |
TABLESPACE_NAME | VARCHAR2(30) | NOT NULL | Name of the tablespace to which the file belongs |
BYTES | NUMBER | Size of the file in bytes | |
BLOCKS | NUMBER | NOT NULL | Size of the file in Oracle blocks |
STATUS | VARCHAR2(9) | File status: AVAILABLE or INVALID (INVALID means that the file number is not in use, for example, a file in a tablespace that was dropped) | |
RELATIVE_FNO | NUMBER | Relative file number | |
AUTOEXTENSIBLE | VARCHAR2(3) | Autoextensible indicator | |
MAXBYTES | NUMBER | Maximum file size in bytes | |
MAXBLOCKS | NUMBER | Maximum file size in blocks | |
INCREMENT_BY | NUMBER | Number of Oracle blocks used as autoextension increment | |
USER_BYTES | NUMBER | The size of the file available for user data. The actual size of the file minus the USER_BYTES value is used to store file related metadata. | |
USER_BLOCKS | NUMBER | Number of blocks which can be used by the data | |
ONLINE_STATUS | VARCHAR2(7) | Online status of the file:SYSOFF SYSTEM OFFLINE ONLINE RECOVER |
DBA_FREE_SPACE
DBA_FREE_SPACE
describes the free extents in all tablespaces in the database.
Note that if a datafile (or entire tablespace) is offline in a locally managed tablespace, you will not see any extent information. If an object has extents in an online file of the tablespace, you will see extent information about the offline datafile. However, if the object is entirely in the offline file, a query of this view will not return any records.
Related View
USER_FREE_SPACE
describes the free extents in the tablespaces accessible to the current user.
Column | Datatype | NULL | Description |
---|---|---|---|
TABLESPACE_NAME | VARCHAR2(30) | Name of the tablespace containing the extent | |
FILE_ID | NUMBER | File identifier number of the file containing the extent | |
BLOCK_ID | NUMBER | Starting block number of the extent | |
BYTES | NUMBER | Size of the extent (in bytes) | |
BLOCKS | NUMBER | Size of the extent (in Oracle blocks) | |
RELATIVE_FNO | NUMBER | Relative file number of the file containing the extent |
DBA_RECYCLEBIN
DBA_RECYCLEBIN
displays information about all recycle bins in the database.
Related View
USER_RECYCLEBIN
displays information about the recycle bin owned by the current user. This view does not display the OWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
OWNER | VARCHAR2(30) | NOT NULL | Name of the original owner of the object |
OBJECT_NAME | VARCHAR2(30) | NOT NULL | New name of the object |
ORIGINAL_NAME | VARCHAR2(32) | Original name of the object | |
OPERATION | VARCHAR2(9) | Operation carried out on the object:DROP - Object was droppedTRUNCATE - Object was truncatedNote: The Oracle Database currently only supports recovering dropped objects from the recycle bin. The truncated objects cannot be recovered. | |
TYPE | VARCHAR2(25) | Type of the object:TABLE NORMAL INDEX BITMAP INDEX NESTED TABLE LOB LOB INDEX DOMAIN INDEX IOT TOP INDEX IOT OVERFLOW SEGMENT IOT MAPPING TABLE TRIGGER Table Partition Table Composite Partition Index Partition Index Composite Partition LOB Partition LOB Composite Partition | |
TS_NAME | VARCHAR2(30) | Name of the tablespace to which the object belongs | |
CREATETIME | VARCHAR2(19) | Timestamp for the creation of the object | |
DROPTIME | VARCHAR2(19) | Timestamp for the dropping of the object | |
DROPSCN | NUMBER | System change number (SCN) of the transaction which moved the object to the recycle bin | |
PARTITION_NAME | VARCHAR2(32) | Name of the partition which was dropped | |
CAN_UNDROP | VARCHAR2(3) | Indicates whether the object can be undropped (YES ) or not (NO ) | |
CAN_PURGE | VARCHAR2(3) | Indicates whether the object can be purged (YES ) or not (NO ) | |
RELATED | NUMBER | NOT NULL | Object number of the parent object |
BASE_OBJECT | NUMBER | NOT NULL | Object number of the base object |
PURGE_OBJECT | NUMBER | NOT NULL | Object number for the object which gets purged |
SPACE | NUMBER | Number of blocks used by the object |
DBA_UNDO_EXTENTS
DBA_UNDO_EXTENTS
describes the extents comprising the segments in all undo tablespaces in the database.
Note:
The status of the undo space distribution reported by
DBA_UNDO_EXTENTS
is correct for the undo tablespace that is active on the instance on whichDBA_UNDO_EXTENTS
is queried. However, due to the use of in-memory information that is different on each instance, there can be a discrepancy in the status of the undo space distribution of undo tablespaces active on other instances when queried from one instance. This does not affect undo functionality and is only a reporting discrepancy for other instances' undo tablespace space distribution status. As a best practice, query the space distribution for an undo tablespace from the instance on which it is active.
Column | Datatype | NULL | Description |
---|---|---|---|
OWNER | CHAR(3) | Owner of the undo tablespace | |
SEGMENT_NAME | VARCHAR2(30) | NOT NULL | Name of the undo segment |
TABLESPACE_NAME | VARCHAR2(30) | NOT NULL | Name of the undo tablespace |
EXTENT_ID | NUMBER | ID of the extent | |
FILE_ID | NUMBER | NOT NULL | File identifier number of the file containing the extent |
BLOCK_ID | NUMBER | Start block number of the extent | |
BYTES | NUMBER | Size of the extent (in bytes) | |
BLOCKS | NUMBER | Size of the extent (in blocks) | |
RELATIVE_FNO | NUMBER | Relative number of the file containing the segment header | |
COMMIT_JTIME | NUMBER | Commit time of the undo in the extent expressed as Julian time. This column is deprecated, but retained for backward compatibility reasons. | |
COMMIT_WTIME | VARCHAR2(20) | Commit time of the undo in the extent expressed as Wallclock time.This column is deprecated, but retained for backward compatibility reasons. | |
STATUS | VARCHAR2(9) | Transaction Status of the undo in the extent:ACTIVE EXPIRED UNEXPIRED |
FLASHBACK_TRANSACTION_QUERY
FLASHBACK_TRANSACTION_QUERY
displays information about all flashback transaction queries in the database. The database must have at least minimal supplemental logging enabled to avoid unpredictable behavior.
Column | Datatype | NULL | Description |
---|---|---|---|
XID | RAW(8) | Transaction identifier | |
START_SCN | NUMBER | Transaction start system change number (SCN) | |
START_TIMESTAMP | DATE | Transaction start timestamp | |
COMMIT_SCN | NUMBER | Transaction commit system change number; NULL for active transactions | |
COMMIT_TIMESTAMP | DATE | Transaction commit timestamp; NULL for active transactions | |
LOGON_USER | VARCHAR2(30) | Logon user for the transaction | |
UNDO_CHANGE# | NUMBER | Undo system change number (1 or higher) | |
OPERATION | VARCHAR2(32) | Forward-going DML operation performed by the transaction:D - DeleteI - InsertU - UpdateB UNKNOWN | |
TABLE_NAME | VARCHAR2(256) | Name of the table to which the DML applies | |
TABLE_OWNER | VARCHAR2(32) | Owner of the table to which the DML applies | |
ROW_ID | VARCHAR2(19) | Rowid of the row that was modified by the DML | |
UNDO_SQL | VARCHAR2(4000) | SQL to undo the DML indicated by OPERATION |
Dynamic Performance View
V$ACTIVE_SESSION_HISTORY
V$ACTIVE_SESSION_HISTORY
displays sampled session activity in the database. It contains snapshots of active database sessions taken once a second. A database session is considered active if it was on the CPU or was waiting for an event that didn't belong to the Idle
wait class. Refer to the V$EVENT_NAME
view for more information on wait classes.
This view contains one row for each active session per sample and returns the latest session sample rows first. A majority of the columns describing the session in the active session history are present in the V$SESSION
view.
Column | Datatype | Description |
---|---|---|
SAMPLE_ID | NUMBER | ID of the sample |
SAMPLE_TIME | TIMESTAMP(3) | Time at which the sample was taken |
IS_AWR_SAMPLE | VARCHAR2(1) | Indicates whether this sample has been flushed or will be flushed to the Automatic Workload Repository (DBA_HIST_ACTIVE_SESS_HISTORY ) (Y ) or not (N ) |
SESSION_ID | NUMBER | Session identifier; maps to V$SESSION.SID |
SESSION_SERIAL# | NUMBER | Session serial number (used to uniquely identify a session's objects); maps to V$SESSION.SERIAL# |
SESSION_TYPE | VARCHAR2(10) | Session type:FOREGROUND BACKGROUND |
FLAGS | NUMBER | Reserved for future use |
USER_ID | NUMBER | Oracle user identifier; maps to V$SESSION.USER# |
SQL_ID | VARCHAR2(13) | SQL identifier of the SQL statement that the session was executing at the time of sampling |
IS_SQLID_CURRENT | VARCHAR2(1) | Indicates whether the SQL identifier in the SQL_ID column is being executed (Y ) or not (N ) |
SQL_CHILD_NUMBER | NUMBER | Child number of the SQL statement that the session was executing at the time of sampling |
SQL_OPCODE | NUMBER | Indicates what phase of operation the SQL statement was in; maps to V$SESSION.COMMAND |
SQL_OPNAME | VARCHAR2(64) | SQL command name |
FORCE_MATCHING_SIGNATURE | NUMBER | Signature used when the CURSOR_SHARING parameter is set to FORCE |
TOP_LEVEL_SQL_ID | VARCHAR2(13) | SQL identifier of the top level SQL statement |
TOP_LEVEL_SQL_OPCODE | NUMBER | Indicates what phase of operation the top level SQL statement was in |
SQL_PLAN_HASH_VALUE | NUMBER | Numerical representation of the SQL plan for the cursor. This information might not be available for all session samples. V$SESSION does not contain this information. |
SQL_PLAN_LINE_ID | NUMBER | SQL plan line ID |
SQL_PLAN_OPERATION | VARCHAR2(30) | Plan operation name |
SQL_PLAN_OPTIONS | VARCHAR2(30) | Plan operation options |
SQL_EXEC_ID | NUMBER | SQL execution identifier |
SQL_EXEC_START | DATE | Time when the execution of the SQL started |
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. Maps to DBA_OBJECTS.OBJECT_ID. |
PLSQL_ENTRY_SUBPROGRAM_ID | NUMBER | Subprogram ID of the top-most PL/SQL subprogram on the stack. Maps to DBA_OBJECTS.DATA_OBJECT_ID. |
PLSQL_OBJECT_ID | NUMBER | Object ID of the currently executing PL/SQL subprogram. Maps to DBA_OBJECTS.OBJECT_ID. |
PLSQL_SUBPROGRAM_ID | NUMBER | Subprogram ID of the currently executing PL/SQL object; NULL if executing SQL. Maps to DBA_OBJECTS.DATA_OBJECT_ID. |
QC_INSTANCE_ID | NUMBER | Query coordinator instance ID. This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0 . |
QC_SESSION_ID | NUMBER | Query coordinator session ID. This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0 . |
QC_SESSION_SERIAL# | NUMBER | Query coordinator session serial number. This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0 . |
PX_FLAGS Foot 1 | NUMBER | Reserved for internal use |
EVENT | VARCHAR2(64) | If SESSION_STATE = WAITING , then the event for which the session was waiting for at the time of sampling.If SESSION_STATE = ON CPU , then this column is NULL. |
EVENT_ID | NUMBER | Identifier of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of the EVENT column. |
EVENT# | NUMBER | Number of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of the EVENT column. |
SEQ# | NUMBER | Sequence number that uniquely identifies the wait (incremented for each wait) |
P1TEXT | VARCHAR2(64) | Text of the first additional parameter |
P1 | NUMBER | First additional parameter |
P2TEXT | VARCHAR2(64) | Text of the second additional parameter |
P2 | NUMBER | Second additional parameter |
P3TEXT | VARCHAR2(64) | Text of the third additional parameter |
P3 | NUMBER | Third additional parameter |
WAIT_CLASS | VARCHAR2(64) | Wait class name of the event for which the session was waiting at the time of sampling. Interpretation is similar to that of the EVENT column. Maps to V$SESSION.WAIT_CLASS . |
WAIT_CLASS_ID | NUMBER | Wait class identifier of the event for which the session was waiting at the time of sampling. Interpretation is similar to that of the EVENT column. Maps to V$SESSION.WAIT_CLASS_ID . |
WAIT_TIME | NUMBER | Total wait time for the event for which the session last waited if the session was on the CPU when sampled; 0 if the session was waiting at the time of samplingNote: Whether or not WAIT_TIME = 0 is what is useful to find the SESSION_STATE at the time of sampling, rather than the actual value of WAIT_TIME itself. Maps to V$SESSION.WAIT_TIME . |
SESSION_STATE | VARCHAR2(7) | Session state:WAITING ON CPU |
TIME_WAITED | NUMBER | If SESSION_STATE = WAITING , then the time that the session actually spent waiting for that event (in microseconds). This column is set for waits that were in progress at the time the sample was taken.If a wait event lasted for more than a second and was caught waiting in more than one session sample row, then the actual time spent waiting for that wait event will be populated in the last of those session sample rows. At any given time, this information will not be available for the latest session sample. |
BLOCKING_SESSION_STATUS | VARCHAR2(11) | Status of the blocking session:VALID NO HOLDER GLOBAL NOT IN WAIT UNKNOWN |
BLOCKING_SESSION | NUMBER | Session identifier of the blocking session. Populated only if the blocker is on the same instance and the session was waiting for enqueues or a "buffer busy" wait. Maps to V$SESSION.BLOCKING_SESSION . |
BLOCKING_SESSION_SERIAL# | NUMBER | Serial number of the blocking session |
BLOCKING_INST_ID | NUMBER | Instance number of the blocker shown in BLOCKING_SESSION |
BLOCKING_HANGCHAIN_INFO | VARCHAR2(1) | Indicates whether the information about BLOCKING_SESSION comes from the hang chain (Y ) or not (N ) |
CURRENT_OBJ# | NUMBER | Object ID of the object that the session is referencing. This information is only available if the session was waiting for application, cluster, concurrency, and user I/O wait events. Maps to V$SESSION.ROW_WAIT_OBJ# . |
CURRENT_FILE# | NUMBER | File number of the file containing the block that the session is referencing. This information is only available if the session was waiting for cluster, concurrency, and user I/O wait events. Maps to V$SESSION.ROW_WAIT_FILE# . |
CURRENT_BLOCK# | NUMBER | ID of the block that the session is referencing. This information is only available if the session was waiting for cluster, concurrency, and user I/O wait events. Maps to V$SESSION.ROW_WAIT_BLOCK# . |
CURRENT_ROW# | NUMBER | Row identifier that the session is referencing. This information is only available if the session was waiting for cluster, concurrency, and user I/O wait events. Maps to V$SESSION.ROW_WAIT_ROW# . |
TOP_LEVEL_CALL# | NUMBER | Oracle top level call number |
TOP_LEVEL_CALL_NAME | VARCHAR2(64) | Oracle top level call name |
CONSUMER_GROUP_ID | NUMBER | Consumer group ID |
XID | RAW(8) | Transaction ID that the session was working on at the time of sampling. V$SESSION does not contain this information. |
REMOTE_INSTANCE# | NUMBER | Remote instance identifier that will serve the block that this session is waiting for. This information is only available if the session was waiting for cluster events. |
TIME_MODEL | NUMBER | Time model information |
IN_CONNECTION_MGMT | VARCHAR2(1) | Indicates whether the session was doing connection management at the time of sampling (Y ) or not (N ) |
IN_PARSE | VARCHAR2(1) | Indicates whether the session was parsing at the time of sampling (Y ) or not (N ) |
IN_HARD_PARSE | VARCHAR2(1) | Indicates whether the session was hard parsing at the time of sampling (Y ) or not (N ) |
IN_SQL_EXECUTION | VARCHAR2(1) | Indicates whether the session was executing SQL statements at the time of sampling (Y ) or not (N ) |
IN_PLSQL_EXECUTION | VARCHAR2(1) | Indicates whether the session was executing PL/SQL at the time of sampling (Y ) or not (N ) |
IN_PLSQL_RPC | VARCHAR2(1) | Indicates whether the session was executing inbound PL/SQL RPC calls at the time of sampling (Y ) or not (N ) |
IN_PLSQL_COMPILATION | VARCHAR2(1) | Indicates whether the session was compiling PL/SQL at the time of sampling (Y ) or not (N ) |
IN_JAVA_EXECUTION | VARCHAR2(1) | Indicates whether the session was executing Java at the time of sampling (Y ) or not (N ) |
IN_BIND | VARCHAR2(1) | Indicates whether the session was doing bind operations at the time of sampling (Y ) or not (N ) |
IN_CURSOR_CLOSE | VARCHAR2(1) | Indicates whether the session was closing a cursor at the time of sampling (Y ) or not (N ) |
IN_SEQUENCE_LOAD | VARCHAR2(1) | Indicates whether the session is loading in sequence (in sequence load code) (Y ) or not (N ) |
CAPTURE_OVERHEAD | VARCHAR2(1) | Indicates whether the session is executing capture code (Y ) or not (N ) |
REPLAY_OVERHEAD | VARCHAR2(1) | Indicates whether the session is executing replay code (Y ) or not (N ) |
IS_CAPTURED | VARCHAR2(1) | Indicates whether the session is being captured (Y ) or not (N ) |
IS_REPLAYED | VARCHAR2(1) | Indicates whether the session is being replayed (Y ) or not (N ) |
SERVICE_HASH | NUMBER | Hash that identifies the Service; maps to V$ACTIVE_SERVICES.NAME_HASH |
PROGRAM | VARCHAR2(48) | Name of the operating system program |
MODULE Foot 2 | VARCHAR2(48) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_MODULE procedure |
ACTION Footref 2 | VARCHAR2(32) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_ACTION procedure |
CLIENT_ID | VARCHAR2(64) | Client identifier of the session; maps to V$SESSION.CLIENT_IDENTIFIER |
MACHINE | VARCHAR2(64) | Client's operating system machine name |
PORT | NUMBER | Client port number |
ECID | VARCHAR2(64) | Execution context identifier (sent by Application Server) |
DBREPLAY_FILE_ID | NUMBER | If the session is being captured or replayed, then DBREPLAY_FILE_ID is the file ID for the workload capture or workload replay; otherwise it is NULL. |
DBREPLAY_CALL_COUNTER | NUMBER | If the session is being captured or replayed, then DBREPLAY_CALL_COUNTER is the call counter of the user call that is being captured or replayed; otherwise it is NULL. |
TM_DELTA_TIME | NUMBER | Time interval (in microseconds) over which TM_DELTA_CPU_TIME and TM_DELTA_DB_TIME are accumulated |
TM_DELTA_CPU_TIME | NUMBER | Amount of time this session spent on CPU over the last TM_DELTA_TIME microseconds |
TM_DELTA_DB_TIME | NUMBER | Amount of time spent by this session in database calls over the last TM_DELTA_TIME microseconds |
DELTA_TIME | NUMBER | Time interval (in microseconds) since the last time this session was sampled or created, over which the next five statistics are accumulated |
DELTA_READ_IO_REQUESTS | NUMBER | Number of read I/O requests made by this session over the last DELTA_TIME microseconds |
DELTA_WRITE_IO_REQUESTS | NUMBER | Number of write I/O requests made by this session over the last DELTA_TIME microseconds |
DELTA_READ_IO_BYTES | NUMBER | Number of I/O bytes read by this session over the last DELTA_TIME microseconds |
DELTA_WRITE_IO_BYTES | NUMBER | Number of I/O bytes written by this session over the last DELTA_TIME microseconds |
DELTA_INTERCONNECT_IO_BYTES | NUMBER | Number of I/O bytes sent over the I/O interconnect over the last DELTA_TIME microseconds |
PGA_ALLOCATED | NUMBER | Amount of PGA memory (in bytes) consumed by this session at the time this sample was taken |
TEMP_SPACE_ALLOCATED | NUMBER | Amount of TEMP memory (in bytes) consumed by this session at the time this sample was taken |
V$DATABASE_BLOCK_CORRUPTION
V$DATABASE_BLOCK_CORRUPTION
displays information about database blocks that were corrupted after the last backup.
Column | Datatype | Description |
---|---|---|
FILE# | NUMBER | Absolute file number of the datafile that contains the corrupt blocks |
BLOCK# | NUMBER | Block number of the first corrupt block in the range of corrupted blocks |
BLOCKS | NUMBER | Number of corrupted blocks found starting with BLOCK# |
CORRUPTION_CHANGE# | NUMBER | Change number at which the logical corruption was detected. Set to 0 to indicate media corruption. |
CORRUPTION_TYPE | VARCHAR2(9) | Type of block corruption in the datafile:ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.CORRUPT - Block is wrongly identified or is not a data block (for example, the data block address is missing)LOGICAL - Block is logically corruptNOLOGGING - Block does not have redo log entries (for example, NOLOGGING operations on primary database can introduce this type of corruption on a physical standby) |
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)` |
USER# | NUMBER | Oracle user identifier |
USERNAME | VARCHAR2(30) | Oracle username |
COMMAND | NUMBER | Command in progress (last statement parsed).You can find the command name for any value n returned in this COMMAND column by running this SQL query:SELECT command_name FROM v$sqlcommand WHERE command_type = n; A value of 0 in this COMMAND column means the command is not recorded in V$SESSION . |
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 SQLINACTIVE - Session which is inactive and either has no configured limits or has not yet exceeded the configured limitsKILLED - Session marked to be killedCACHED - Session temporarily cached for use by Oracle*XASNIPED - 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)` |
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)` |
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 |
MODULE Foot 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 |
ACTION Footref 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 sessionSESSION - Client is able to fail over its session following a disconnectSELECT - Client is able to fail over queries in progress as wellSee Also:Oracle Database Concepts for more information on TAFOracle Database Net Services Administrator's Guide for information on configuring TAF |
FAILOVER_METHOD | VARCHAR2(10) | Indicates the transparent application failover method for the session:NONE - Failover is disabled for this sessionBASIC - Client itself reconnects following a disconnectPRECONNECT - 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 columnsNO HOLDER - there is no session blocking this sessionNOT IN WAIT - this session is not in a waitUNKNOWN - 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 columnsNO HOLDER - there is no session blocking this sessionNOT IN WAIT - this session is not in a waitUNKNOWN - 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 waitingWAITED 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 secondWAITED 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 waitNULL - 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)` |
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.
V$SESSION_LONGOPS
V$SESSION_LONGOPS
displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.
To monitor query execution progress, you must be using the cost-based optimizer and you must:
- Set the
TIMED_STATISTICS
orSQL_TRACE
parameters totrue
- Gather statistics for your objects with the
DBMS_STATS
package
You can add information to this view about application-specific long-running operations by using the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS
procedure.
Column | Datatype | Description |
---|---|---|
SID | NUMBER | Identifier of the session processing the long-running operation. If multiple sessions are cooperating in the long-running operation, then SID corresponds to the main or master session. |
SERIAL# | NUMBER | Serial number of the session processing the long-running operation. If multiple sessions are cooperating in the long-running operation, then SERIAL# corresponds to the main or master session. SERIAL# is 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. |
OPNAME | VARCHAR2(64) | Brief description of the operation |
TARGET | VARCHAR2(64) | Object on which the operation is carried out |
TARGET_DESC | VARCHAR2(32) | Description of the target |
SOFAR | NUMBER | Units of work done so far for the operation specified in the OPNAME column |
TOTALWORK | NUMBER | Total units of work for the operation specified in the OPNAME column |
UNITS | VARCHAR2(32) | Units of measurement |
START_TIME | DATE | Starting time of the operation |
LAST_UPDATE_TIME | DATE | Time when statistics were last updated for the operation |
TIMESTAMP | DATE | Timestamp specific to the operation |
TIME_REMAINING | NUMBER | Estimate (in seconds) of time remaining for the operation to complete |
ELAPSED_SECONDS | NUMBER | Number of elapsed seconds from the start of the operations |
CONTEXT | NUMBER | Context |
MESSAGE | VARCHAR2(512) | Statistics summary message |
USERNAME | VARCHAR2(30) | User ID of the user performing the operation |
SQL_ADDRESS | `RAW(4 | 8)` |
SQL_HASH_VALUE | NUMBER | Used with the value of the SQL_ADDRESS column to identify the SQL statement associated with the operation |
SQL_ID | VARCHAR2(13) | SQL identifier of the SQL statement associated with the long operation, if any |
SQL_PLAN_HASH_VALUE | NUMBER | SQL plan hash value; NULL if SQL_ID is NULL |
SQL_EXEC_START | DATE | Time when the execution of the SQL started; NULL if SQL_ID is NULL |
SQL_EXEC_ID | NUMBER | SQL execution identifier (see V$SQL_MONITOR ) |
SQL_PLAN_LINE_ID | NUMBER | SQL plan line ID corresponding to the long operation; NULL if the long operation is not associated with a line of the execution plan |
SQL_PLAN_OPERATION | VARCHAR2(30) | Plan operation name; NULL if SQL_PLAN_LINE_ID is NULL |
SQL_PLAN_OPTIONS | VARCHAR2(30) | Plan operation options; NULL if SQL_PLAN_LINE_ID is NULL |
QCSID | NUMBER | Session identifier of the parallel coordinator |
V$PARAMETER
V$PARAMETER
displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER
view.
Column | Datatype | Description |
---|---|---|
NUM | NUMBER | Parameter number |
NAME | VARCHAR2(80) | Name of the parameter |
TYPE | NUMBER | Parameter type:1 - Boolean2 - String3 - Integer4 - Parameter file5 - Reserved6 - Big integer |
VALUE | VARCHAR2(4000) | Parameter value for the session (if modified within the session); otherwise, the instance-wide parameter value |
DISPLAY_VALUE | VARCHAR2(4000) | Parameter value in a user-friendly format. For example, if the VALUE column shows the value 262144 for a big integer parameter, then the DISPLAY_VALUE column will show the value 256K . |
ISDEFAULT | VARCHAR2(9) | Indicates whether the parameter is set to the default value (TRUE ) or the parameter value was specified in the parameter file (FALSE ) |
ISSES_MODIFIABLE | VARCHAR2(5) | Indicates whether the parameter can be changed with ALTER SESSION (TRUE ) or not (FALSE ) |
ISSYS_MODIFIABLE | VARCHAR2(9) | Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances. |
ISINSTANCE_MODIFIABLE | VARCHAR2(5) | For parameters that can be changed with ALTER SYSTEM , indicates whether the value of the parameter can be different for every instance (TRUE ) or whether the parameter must have the same value for all Real Application Clusters instances (FALSE ). If the ISSYS_MODIFIABLE column is FALSE , then this column is always FALSE . |
ISMODIFIED | VARCHAR2(10) | Indicates whether the parameter has been modified after instance startup:MODIFIED - Parameter has been modified with ALTER SESSION``SYSTEM_MOD - Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions' values to be modified)FALSE - Parameter has not been modified after instance startup |
ISADJUSTED | VARCHAR2(5) | Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number) |
ISDEPRECATED | VARCHAR2(5) | Indicates whether the parameter has been deprecated (TRUE ) or not (FALSE ) |
ISBASIC | VARCHAR2(5) | Indicates whether the parameter is a basic parameter (TRUE ) or not (FALSE ) |
DESCRIPTION | VARCHAR2(255) | Description of the parameter |
UPDATE_COMMENT | VARCHAR2(255) | Comments associated with the most recent update |
HASH | NUMBER | Hash value for the parameter name |
V$TRANSACTION
V$TRANSACTION
lists the active transactions in the system.
Column | Datatype | Description |
---|---|---|
ADDR | `RAW(4 | 8)` |
XIDUSN | NUMBER | Undo segment number |
XIDSLOT | NUMBER | Slot number |
XIDSQN | NUMBER | Sequence number |
UBAFIL | NUMBER | Undo block address (UBA) filenum |
UBABLK | NUMBER | UBA block number |
UBASQN | NUMBER | UBA sequence number |
UBAREC | NUMBER | UBA record number |
STATUS | VARCHAR2(16) | Status |
START_TIME | VARCHAR2(20) | Start time (wall clock) |
START_SCNB | NUMBER | Start system change number (SCN) base |
START_SCNW | NUMBER | Start SCN wrap |
START_UEXT | NUMBER | Start extent number |
START_UBAFIL | NUMBER | Start UBA file number |
START_UBABLK | NUMBER | Start UBA block number |
START_UBASQN | NUMBER | Start UBA sequence number |
START_UBAREC | NUMBER | Start UBA record number |
SES_ADDR | `RAW(4 | 8)` |
FLAG | NUMBER | Flag |
SPACE | VARCHAR2(3) | YES if a space transaction |
RECURSIVE | VARCHAR2(3) | YES if a recursive transaction |
NOUNDO | VARCHAR2(3) | YES if a no undo transaction |
PTX | VARCHAR2(3) | YES if parallel transaction |
NAME | VARCHAR2(256) | Name of a named transaction |
PRV_XIDUSN | NUMBER | Previous transaction undo segment number |
PRV_XIDSLT | NUMBER | Previous transaction slot number |
PRV_XIDSQN | NUMBER | Previous transaction sequence number |
PTX_XIDUSN | NUMBER | Rollback segment number of the parent XID |
PTX_XIDSLT | NUMBER | Slot number of the parent XID |
PTX_XIDSQN | NUMBER | Sequence number of the parent XID |
DSCN-B | NUMBER | This column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_BASE . |
DSCN-W | NUMBER | This column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_WRAP . |
USED_UBLK | NUMBER | Number of undo blocks used |
USED_UREC | NUMBER | Number of undo records used |
LOG_IO | NUMBER | Logical I/O |
PHY_IO | NUMBER | Physical I/O |
CR_GET | NUMBER | Consistent gets |
CR_CHANGE | NUMBER | Consistent changes |
START_DATE | DATE | Start time (wall clock) |
DSCN_BASE | NUMBER | Dependent SCN base |
DSCN_WRAP | NUMBER | Dependent SCN wrap |
START_SCN | NUMBER | Start SCN |
DEPENDENT_SCN | NUMBER | Dependent SCN |
XID | RAW(8) | Transaction XID |
PRV_XID | RAW(8) | Previous transaction XID |
PTX_XID | RAW(8) | Parent transaction XID |
V$UNDOSTAT
V$UNDOSTAT
displays a histogram of statistical data to show how well the system is working. The available statistics include undo space consumption, transaction concurrency, and length of queries executed in the instance. You can use this view to estimate the amount of undo space required for the current workload. Oracle uses this view to tune undo usage in the system. The view returns NULL values if the system is in manual undo management mode.
Each row in the view keeps statistics collected in the instance for a 10-minute interval. The rows are in descending order by the BEGIN_TIME
column value. Each row belongs to the time interval marked by (BEGIN_TIME
, END_TIME
). Each column represents the data collected for the particular statistic in that time interval. The first row of the view contains statistics for the (partial) current time period. The view contains a total of 576 rows, spanning a 4 day cycle.
Column | Datatype | Description |
---|---|---|
BEGIN_TIME | DATE | Identifies the beginning of the time interval |
END_TIME | DATE | Identifies the end of the time interval |
UNDOTSN | NUMBER | Represents the last active undo tablespace in the duration of time. The tablespace ID of the active undo tablespace is returned in this column. If more than one undo tablespace was active in that period, the active undo tablespace that was active at the end of the period is reported. |
UNDOBLKS | NUMBER | Represents the total number of undo blocks consumed. You can use this column to obtain the consumption rate of undo blocks, and thereby estimate the size of the undo tablespace needed to handle the workload on your system. |
TXNCOUNT | NUMBER | Identifies the total number of transactions executed within the period |
MAXQUERYLEN | NUMBER | Identifies the length of the longest query (in seconds) executed in the instance during the period. You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter. The length of a query is measured from the cursor open time to the last fetch/execute time of the cursor. Only the length of those cursors that have been fetched/executed during the period are reflected in the view. |
MAXQUERYID | VARCHAR2(13) | SQL identifier of the longest running SQL statement in the period |
MAXCONCURRENCY | NUMBER | Identifies the highest number of transactions executed concurrently within the period |
UNXPSTEALCNT | NUMBER | Number of attempts to obtain undo space by stealing unexpired extents from other transactions |
UNXPBLKRELCNT | NUMBER | Number of unexpired blocks removed from certain undo segments so they can be used by other transactions |
UNXPBLKREUCNT | NUMBER | Number of unexpired undo blocks reused by transactions |
EXPSTEALCNT | NUMBER | Number of attempts to steal expired undo blocks from other undo segments |
EXPBLKRELCNT | NUMBER | Number of expired undo blocks stolen from other undo segments |
EXPBLKREUCNT | NUMBER | Number of expired undo blocks reused within the same undo segments |
SSOLDERRCNT | NUMBER | Identifies the number of times the error ORA-01555 occurred. You can use this statistic to decide whether or not the UNDO_RETENTION initialization parameter is set properly given the size of the undo tablespace. Increasing the value of UNDO_RETENTION can reduce the occurrence of this error. |
NOSPACEERRCNT | NUMBER | Identifies the number of times space was requested in the undo tablespace and there was no free space available. That is, all of the space in the undo tablespace was in use by active transactions. The corrective action is to add more space to the undo tablespace. |
ACTIVEBLKS | NUMBER | Total number of blocks in the active extents of the undo tablespace for the instance at the sampled time in the period |
UNEXPIREDBLKS | NUMBER | Total number of blocks in the unexpired extents of the undo tablespace for the instance at the sampled time in the period |
EXPIREDBLKS | NUMBER | Total number of blocks in the expired extents of the undo tablespace for the instance at the sampled time in the period |
TUNED_UNDORETENTION | NUMBER | Amount of time (in seconds) for which undo will not be recycled from the time it was committed. At any point in time, the latest value of TUNED_UNDORETENTION is used to determine whether data committed at a particular time in the past can be recycled. |
Parameter
DB_RECOVERY_FILE_DEST
Property | Description |
---|---|
Parameter type | String |
Syntax | DB_RECOVERY_FILE_DEST = directory ` |
Default value | There is no default value. |
Modifiable | ALTER SYSTEM ... SID='*' |
Basic | Yes |
Oracle RAC | You must set this parameter for every instance, and multiple instances must have the same value. |
B_RECOVERY_FILE_DEST
specifies the default location for the fast recovery area. The fast recovery area contains multiplexed copies of current control files and online redo logs, as well as archived redo logs, flashback logs, and RMAN backups.
Specifying this parameter without also specifying the DB_RECOVERY_FILE_DEST_SIZE
initialization parameter is not allowed.
DB_RECOVERY_FILE_DEST_SIZE
Property | Description |
---|---|
Parameter type | Big integer |
Syntax | DB_RECOVERY_FILE_DEST_SIZE = integer `[K |
Default value | There is no default value. |
Modifiable | ALTER SYSTEM ... SID='*' |
Basic | Yes |
Oracle RAC | You must set this parameter for every instance, and multiple instances must have the same value. |
DB_RECOVERY_FILE_DEST_SIZE
specifies (in bytes) the hard limit on the total space to be used by target database recovery files created in the fast recovery area.
Note that neither block 0 nor the OS block header of each Oracle file is included in this size. Allow an extra 10% for this data when computing the actual disk usage required for the fast recovery area.
FAST_START_MTTR_TARGET
Property | Description |
---|---|
Parameter type | Integer |
Default value | 0 |
Modifiable | ALTER SYSTEM |
Range of values | 0 to 3600 seconds |
Basic | No |
Oracle RAC | Multiple instances can have different values, and you can change the values at runtime. |
FAST_START_MTTR_TARGET
enables you to specify the number of seconds the database takes to perform crash recovery of a single instance. When specified, FAST_START_MTTR_TARGET
is overridden by LOG_CHECKPOINT_INTERVAL
.
LOG_ARCHIVE_DEST_n
Property | Description |
---|---|
Parameter type | String |
Syntax | `LOG_ARCHIVE_DEST_[1 |
Default value | There is no default value. |
Modifiable | ALTER SESSION , ALTER SYSTEM |
Basic | Yes |
The LOG_ARCHIVE_DEST_``n
initialization parameter defines up to 31 (where n
= 1, 2, 3, ... 31) destinations, each of which must specify either the LOCATION
or the SERVICE
attribute to specify where to archive the redo data. All other attributes are optional. Note that whether you are specifying the LOCATION
attribute or the SERVICE
attribute, it must be the first attribute supplied in the list of attributes.
If you choose not to enter any attributes, then you can specify a NULL string by entering the following:
LOG_ARCHIVE_DEST_n=' ';
You set the attributes for the LOG_ARCHIVE_DEST_``n
initialization parameter to control different aspects of how redo transport services transfer redo data from a production or primary database destination to another (standby) database destination. You can query the V$ARCHIVE_DEST
view to see the current attribute settings for each destination (n
).
Note:
Some of the attributes for this parameter are deprecated, but are being retained for backward compatibility. See "Deprecated Attributes for LOG_ARCHIVE_DEST_n".
For every LOG_ARCHIVE_DEST_n
initialization parameter that you define, you must specify a corresponding LOG_ARCHIVE_DEST_STATE_n
parameter. The LOG_ARCHIVE_DEST_STATE_n
(where n
is an integer from 1 to 31) initialization parameter specifies whether the corresponding destination is currently enabled or disabled.
See Also:
Destinations LOG_ARCHIVE_DEST_11
through LOG_ARCHIVE_DEST_31
do not support the SYNC
, ARCH
, LOCATION
, MANDATORY
, or ALTERNATE
attributes, and cannot be specified as the target of the ALTERNATE
attribute.
LOG_ARCHIVE_DEST_11
through LOG_ARCHIVE_DEST_31
can only be used when the COMPATIBLE
initialization parameter is set to 11.2.0
or higher.
Values:
See Also:
Oracle Data Guard Concepts and Administration for detailed descriptions of all the values listed in this section
Control whether a redo transport destination acknowledges received redo data before or after writing it to the standby redo log. The default is
NOAFFIRM
.Specifies an alternate archiving destination to be used when the original destination fails. There is no default value; if an alternate destination is not specified, then archiving does not automatically change to another destination if the original destination fails.
The redo data generated by a transaction need not have been received at a destination which has this attribute before that transaction can commit. This is the default behavior if neither
SYNC
norASYNC
is specified.Indicates whether network compression is enabled or disabled.
The
COMPRESSION
attribute is ignored if the Advanced Compression option has not been enabled.Specifies a unique name for the database at this destination. You must specify a name; there is no default value.
[
DELAY
=minutes]Specifies a minimum time lag between when redo data is archived on a standby site retrieving redo from a primary and when the archived redo log file is applied to the standby database or any standbys cascading from it. If you specify the DELAY attribute without a time interval, the default is 30 minutes.
LOCATION
=local_disk_directory orUSE_DB_RECOVERY_FILE_DEST
Specifies either a local file system destination or the directory, file system, or Automatic Storage Manager disk group that will serve as the fast recovery area. You must specify this attribute for at least one destination. You can specify either a local disk directory or fast recovery area with the
LOCATION
attribute. You must include either theLOCATION
or theSERVICE
attribute for each destination to specify where to archive the redo data.Specifies that the transmission of redo data to the destination must succeed before the local online redo log file can be made available for reuse. If the
MANDATORY
attribute is not specified, then the destination is optional.Specifies the maximum number of network connections that can be used to transmit redo data to this destination. The default is 1.
Controls the consecutive number of times redo transport services attempt to reestablish communication and transmit redo data to a failed destination before the primary database permanently gives up on the standby database.
Specifies the number of seconds the log writer process on the primary system waits for status from the network server (LNSn) process before terminating the network connection. The default is 30 seconds.
Indicates that the location of the archived redo log file is not to be recorded at the corresponding destination.
[
REOPEN
=seconds]Specifies the minimum number of seconds before the archiver processes (ARCn) or the log writer process (LGWR) should try again to access a previously failed destination. The default is 300 seconds.
Specifies a valid Oracle Net service name (
SERVICE=
net_service_name) that identifies the remote Oracle database instance to which redo data will be sent. Each destination must specify either theLOCATION
or theSERVICE
attribute. There is no default net service name.The redo data generated by a transaction must have been received by every enabled destination which has this attribute before that transaction can commit.
TEMPLATE
=filename_template%t%s_%rSpecifies a pathname and a filename template for archived redo log files created at a redo transport destination that contain redo data from the database where this attribute is specified. This attribute overrides the value of the
LOG_ARCHIVE_FORMAT
initialization parameter at a redo transport destination. This attribute does not have a default value.VALID_FOR=(redo_log_type, database_role)
Identifies when redo transport services can transmit redo data to destinations based on the following factors:
redo_log_type
—whether online redo log files, standby redo log files, or both are currently being archived on the database at this destinationdatabase_role
—whether the database is currently running in the primary or the standby role
Deprecated Attributes for LOG_ARCHIVE_DEST_n
The following attributes are deprecated for the LOG_ARCHIVE_DEST_``n
parameter. They are retained for backward compatibility only.
Table 1-2 Deprecated Attributes on the LOG_ARCHIVE_DEST_n Initialization Parameter
Deprecated Attribute | Alternative |
---|---|
ARCH | Specify SYNC or ASYNC . ASYNC is the default if neither attribute is specified. |
LGWR | Specify SYNC or ASYNC . ASYNC is the default if neither attribute is specified. |
OPTIONAL | Destinations are optional by default. |
VERIFY | None. This attribute is only used with the deprecated ARCH attribute. |
In addition, note the following changes to the ASYNC
and SYNC
attributes:
The
BLOCKS
keyword on theASYNC
attribute is no longer needed.It is no longer necessary to set this keyword because Data Guard dynamically adjusts the block count up or down to an appropriate number of blocks, as necessary.
The
PARALLEL
andNOPARALLEL
keywords on theSYNC
attribute are no longer needed.
REMOTE_LOGIN_PASSWORDFILE
Property | Description |
---|---|
Parameter type | String |
Syntax | `REMOTE_LOGIN_PASSWORDFILE = { shared |
Default value | exclusive |
Modifiable | No |
Basic | Yes |
Oracle RAC | Multiple instances must have the same value. |
REMOTE_LOGIN_PASSWORDFILE
specifies whether Oracle checks for a password file.
Values:
shared
One or more databases can use the password file. The password file can contain
SYS
as well as non-SYS
users.exclusive
The password file can be used by only one database. The password file can contain
SYS
as well as non-SYS
users.none
Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system.
Notes:
- When
REMOTE_LOGIN_PASSWORDFILE
is set to eitherexclusive
orshared
, but the password file does not exist, then the behavior is the same as settingREMOTE_LOGIN_PASSWORDFILE
tonone
.- If you change
REMOTE_LOGIN_PASSWORDFILE
toexclusive
orshared
fromnone
, then ensure that the password file is in sync with the dictionary passwords. See Oracle Database Administrator's Guide for more information.
STATISTICS_LEVEL
Property | Description |
---|---|
Parameter type | String |
Syntax | `STATISTICS_LEVEL = { ALL |
Default value | TYPICAL |
Modifiable | ALTER SESSION , ALTER SYSTEM |
STATISTICS_LEVEL
specifies the level of collection for database and operating system statistics. The Oracle Database collects these statistics for a variety of purposes, including making self-management decisions.
The default setting of TYPICAL
ensures collection of all major statistics required for database self-management functionality and provides best overall performance. The default value should be adequate for most environments.
When the STATISTICS_LEVEL
parameter is set to ALL
, additional statistics are added to the set of statistics collected with the TYPICAL
setting. The additional statistics are timed OS statistics and plan execution statistics.
Setting the STATISTICS_LEVEL
parameter to BASIC
disables the collection of many of the important statistics required by Oracle Database features and functionality, including:
- Automatic Workload Repository (AWR) Snapshots
- Automatic Database Diagnostic Monitor (ADDM)
- All server-generated alerts
- Automatic SGA Memory Management
- Automatic optimizer statistics collection
- Object level statistics
- End to End Application Tracing (
V$CLIENT_STATS
) - Database time distribution statistics (
V$SESS_TIME_MODEL
andV$SYS_TIME_MODEL
) - Service level statistics
- Buffer cache advisory
- MTTR advisory
- Shared pool sizing advisory
- Segment level statistics
- PGA Target advisory
- Timed statistics
- Monitoring of statistics
Note:
Oracle strongly recommends that you do not disable these important features and functionality.
When the STATISTICS_LEVEL
parameter is modified by ALTER SYSTEM
, all advisories or statistics are dynamically turned on or off, depending on the new value of STATISTICS_LEVEL
. When modified by ALTER SESSION
, the following advisories or statistics are turned on or off in the local session only. Their system-wide state is not changed:
- Timed statistics
- Timed OS statistics
- Plan execution statistics
The V$STATISTICS_LEVEL
view displays information about the status of the statistics or advisories controlled by the STATISTICS_LEVEL
parameter.See "V$STATISTICS_LEVEL".