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

本站中文解释

Oracle 视图V$THREAD表具有用于跟踪当前数据库实例的多种线程的功能,V$THREAD能够显示出现在每个线程中的每条SQL语句,其视图中的每个字段都记录每个连接的信息。它们可以被用来监控正在操作此数据库实例的连接、服务器进程、会话以及数据库工作线程的状态、活动以及进程等。

使用方法:

1.查看线程:使用SELECT 查看V$THREAD视图,可以查看当前正在操作此数据库实例的连接、服务器进程、会话以及数据库工作线程的状态、活动以及进程等。

2.查看进程:使用SELECT引用V$THREAD视图,查看每个进程的状态,包括来自用户会话的响应时间,以及此进程可用于其他用户操作的空闲时间和有效时间等。

3.查看服务器进程:使用SELECT查看V$THREAD视图,可以查看每个服务器进程所执行的SQL语句和最后一次执行的时间,以及工作的实际开始时间和结束时间等。

官方英文解释

V$THREAD displays thread information from the control file. This view does not return meaningful results on a physical standby database.
Column Datatype Description

THREAD#

NUMBER

Thread number

STATUS

VARCHAR2(6)

Thread status (OPEN| CLOSED)

ENABLED

VARCHAR2(8)

Enabled status: DISABLED, (enabled) PRIVATE, or (enabled) PUBLIC

GROUPS

NUMBER

Number of log groups assigned to this thread

INSTANCE

VARCHAR2(80)

Instance name, if available

OPEN_TIME

DATE

Last time the thread was opened

CURRENT_GROUP#

NUMBER

Current log group

SEQUENCE#

NUMBER

Sequence number of current log

CHECKPOINT_CHANGE#

NUMBER

SCN at last checkpoint

CHECKPOINT_TIME

DATE

Time of last checkpoint

ENABLE_CHANGE#

NUMBER

SCN at which thread was enabled

ENABLE_TIME

DATE

Time of enable SCN

DISABLE_CHANGE#

NUMBER

SCN at which thread was disabled

DISABLE_TIME

DATE

Time of disable SCN

LAST_REDO_SEQUENCE#

NUMBER

Last redo sequence number written by LGWR

LAST_REDO_BLOCK

NUMBER

Last redo block written by LGWR

LAST_REDO_CHANGE#

NUMBER

SCN of last redo for the thread

LAST_REDO_TIME

DATE

Time of last redo for the thread

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


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