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

本站中文解释

Oracle 视图V$GLOBAL_TRANSACTION,提供了一个总览全局事务状态及在数据库中活动的事务详细信息,可以帮助用户确定有关全局事务的信息。V$GLOBAL_TRANSACTION 视图表示当前正从 XA 全局事务中管理的事务。

使用 Oracle 视图V$GLOBAL_TRANSACTION的步骤:

1.登录 SQL*Plus,输入“select”查看当前所有活动的全局事务。

2.输入“select gtxid,status from v$global_transaction”来查看全局事务ID以及当前活动状态。

3.根据需要,通过以下语句查看特定全局事务的详细信息:“Select*Fromv$global_transaction gtxid where =GTXID”

4.若要修改特定的全局事务的状态,可以使用以下语句:“Updatev$global_transaction setstatus= 状态 wheregtxid= GTXID”

官方英文解释

V$GLOBAL_TRANSACTION displays information on the currently active global transactions.

Column Datatype Description

FORMATID

NUMBER

Format identifier of the global transaction

GLOBALID

RAW(64)

Global transaction identifier of the global transaction

BRANCHID

RAW(64)

Branch qualifier of the global transaction

BRANCHES

NUMBER

Total number of branches in the global transaction

REFCOUNT

NUMBER

Number of siblings for the global transaction (must be the same as branches)

PREPARECOUNT

NUMBER

Number of branches of the global transaction that have prepared

STATE

VARCHAR2(38)

State of the branch of the global transaction:

  • ACTIVE

  • COLLECTING

  • FINALIZED

  • FAILED

  • RECOVERING

  • UNASSOCIATED

  • FORGOTTEN

  • READY FOR RECOVERY

  • NO-READONLY FAILED

  • SIBLING INFO WRITTEN

  • [ORACLE COORDINATED]ACTIVE

  • [ORACLE COORDINATED]COLLECTING

  • [ORACLE COORDINATED]FINALIZED

  • [ORACLE COORDINATED]FAILED

  • [ORACLE COORDINATED]RECOVERING

  • [ORACLE COORDINATED]UNASSOCIATED

  • [ORACLE COORDINATED]FORGOTTEN

  • [ORACLE COORDINATED]READY FOR RECOVERY

  • [ORACLE COORDINATED]NO-READONLY FAILED

  • [MULTINODE]ACTIVE

  • [MULTINODE]COLLECTING

  • [MULTINODE]FINALIZED

  • [MULTINODE]FAILED

  • [MULTINODE]RECOVERING

  • [MULTINODE]UNASSOCIATED

  • [MULTINODE]FORGOTTEN

  • [MULTINODE]READY FOR RECOVERY

  • [MULTINODE]NO-READONLY FAILED

  • [MULTINODE]SIBLING INFO WRITTEN

  • COMBINATION

FLAGS

NUMBER

The numeric representation of the state

COUPLING

VARCHAR2(15)

Indicates whether the branches are free (FREE), loosely coupled (LOOSELY COUPLED), or tightly coupled (TIGHTLY COUPLED)

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$GLOBAL_TRANSACTION 官方解释,作用,如何使用详细说明