Oracle 视图 DBA_ACTIVITY_TABLE 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_ACTIVITY_TABLE是由用户SYS(拥有超级用户权限)拥有的一种数据库查询视图,它由Oracle提供的数据字典表或视图的一种聚合,用于查看当前实例的活动在当前数据库中正在运行的各种被跟踪的任务的状态,包括但不限于等待事件,时间,会话ID等。因此,它也可以用来监视当前FM/RMAN任务,并帮助DBA发现正在运行的并发操作及可能产生冲突的操作。它还可以用来收集有关特定的会话的信息,以便快速查找并解决性能问题,例如拥有最长等待时间的会话。

要使用DBA_ACTIVITY_TABLE,必须首先使用连接到Oracle数据库的SQL * Plus。接下来,使用以下SELECT语句从视图中查询数据:

SELECT * FROM DBA_ACTIVITY_TABLE;

此SELECT语句将返回当前用户实例的活动情况,包括活动的会话ID,等待事件,时间,状态等。

官方英文解释

DBA_ACTIVITY_TABLE describes table activity snapshots that were recently taken by the Object Activity Tracking System (OATS).

Each row in this view represents one recently completed activity snapshot and describes the table activity that occurred during the snapshot interval.

Column Datatype NULL Description

SNAP_ID

NUMBER

NOT NULL

Activity snapshot identifier

CON_DBNAME

VARCHAR2(128)

NOT NULL

Name of the container to which the data pertains

INSTANCE_NUMBER

NUMBER

NOT NULL

Identifier for the instance in which the activity snapshot was taken

BEGIN_TIME

TIMESTAMP(3)

NOT NULL

Begin time for the activity snapshot interval

END_TIME

TIMESTAMP(3)

NOT NULL

End time for the activity snapshot interval

TABLE_NAME

VARCHAR2(128)

NOT NULL

Name of the table for which the activity snapshot was taken

TABLE_OWNER

VARCHAR2(128)

NOT NULL

Owner of the table for which the activity snapshot was taken

USER_CLASS

VARCHAR2(7)

Reserved for future use

SCANS

NUMBER

Number of table scans

LOADS

NUMBER

Number of table loads

LOAD_ROWS

NUMBER

Number of rows that were loaded into the table

INSERT_ROWS

NUMBER

Number of rows that were inserted into the table

DELETE_ROWS

NUMBER

Number of rows that were deleted from the table

UPDATE_ROWS

NUMBER

Number of table rows that were updated

TRUNCATES

NUMBER

Number of table truncations

TRUNCATED_ROWS

NUMBER

Number of table rows that were deleted due to table truncations

PARTITION_TRUNCATES

NUMBER

Number of table partition or subpartition truncations

PARTITION_TRUNCATED_ROWS

NUMBER

Number of table rows that were deleted due to table partition or subpartition truncations

PARTITION_CREATES

NUMBER

Number of table partitions or subpartitions that were created

PARTITION_DROPS

NUMBER

Number of table partition or subpartition drops

PARTITION_DROPS_ROWS

NUMBER

Number of table rows that were dropped due to table partition or subpartition drops

PARTITION_MOVES

NUMBER

Number of table partition or subpartition moves

PARTITION_MOVES_ROWS

NUMBER

Number of table rows that were moved due to table partition or subpartition moves

PARTITION_SPLITS

NUMBER

Number of table partition or subpartition splits

PARTITION_SPLITS_ROWS

NUMBER

Number of table rows that were split due to table partition or subpartition splits

PARTITION_MERGES

NUMBER

Number of table partition or subpartition merges

PARTITION_MERGES_ROWS

NUMBER

Number of table rows that were merged due to table partition or subpartition merges

PARTITION_COALESCES

NUMBER

Number of table partition or subpartition coalesces

PARTITION_COALESCE_ROWS

NUMBER

Number of table rows that were redistributed due to table partition or subpartition coalesces

PARTITION_EXCHANGES

NUMBER

Number of table partition or subpartition exchanges

PARTITION_EXCHANGES_ROWS

NUMBER

Number of table rows that were exchanged due to table partition or subpartition exchanges

Note:

The counts in this view are approximate in order to keep system overhead low. Also, there are database activities, such as statistics collection, query compilation, and query optimization, that may cause the counts to be different than expected or to vary slightly across successive queries.

Note:

This view does not contain information related to temporary tables or external tables.

Note:

This view is available starting with Oracle Database 21c.

See Also:

“V$ACTIVITY_TABLE” to view in-progress table activity snapshots


数据运维技术 » Oracle 视图 DBA_ACTIVITY_TABLE 官方解释,作用,如何使用详细说明