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

本站中文解释

Oracle视图V$FLASHBACK_TXN_GRAPH用于显示当前Oracle实例中全局事务图表,它以有向图显示事务图,该图可以用来查看全局事务中父子事务之间的关系。

用途:

1.通过V$FLASHBACK_TXN_GRAPH视图可以帮助查找事务依赖项,在做恢复时,可以依据该视图数据正确的恢复全局事务。

2.当事务出现死锁时,可以使用该视图V$FLASHBACK_TXN_GRAPH找出死锁的原因,当发现死锁之后,可以采取对应的方式来解决死锁的问题。

3.使用该视图V$FLASHBACK_TXN_GRAPH可以帮助查找和符合特定条件的事务,可以为任务定位和调整性能提供帮助。

使用方式:

可以使用SQL查询来查看Oracle实例中全局事务之间的图表,具体查询语句如下:

SELECT * FROM V$FLASHBACK_TXN_GRAPH;

官方英文解释

V$FLASHBACK_TXN_GRAPH displays a tabular representation of the transaction dependency graph. For each dependency edge, there could be multiple rows, one for each conflicting operation.

This view is relevant AFTER a compensating transaction has been started through the DBMS_FLASHBACK.TRANSACTION_BACKOUT() set of functions, and is no longer relevant once the compensating transaction is either committed or rolled back. It also provides a tabular representation of the undo SQL that is not available through the CLOB XML construct in the DBA_FLASHBACK_TXN_REPORT view.

Column Datatype Description

COMPENSATING_XID

RAW(8)

Transaction ID of the compensating transaction

COMPENSATING_TXN_NAME

VARCHAR2(255)

Name of the compensating transaction

XID

RAW(8)

Transaction ID of a relevant transaction found in memory

TXN_NAME

VARCHAR2(255)

Name of the transaction with XID as the transaction ID; NULL if none

PARENT_XID

RAW(8)

Parent transaction ID (for a PDML transaction)

INTERESTING

NUMBER

If the transaction is in the transaction dependency graph

ORIGINAL

NUMBER

If the transaction is part of the input set provided

BACKOUT_SEQ

NUMBER

Order in which the transaction has been backed out

NUM_PREDS

NUMBER

Number of predecessors of the transaction specified by XID in the transaction graph

NUM_SUCCS

NUMBER

Number of successors of the transaction specified by XID in the transaction graph

DEP_XID

RAW(8)

One dependent transaction ID of the transaction specified by XID. This is a particular child of XID.

DEP_TXN_NAME

VARCHAR2(255)

Transaction name, if any, for the transaction specified by DEP_XID

TXN_CONF_SQL_ID

NUMBER

SQL ID of undo SQL executed in the context of XID which conflicts with the dependent transaction

DEP_TXN_CONF_SQL_ID

NUMBER

SQL ID of undo SQL executed in the context of DEP_XID which conflicts with XID

CONFLICT_TYPE

VARCHAR2(32)

The type of conflict that the conflict resolution method is used to resolve: delete, uniqueness, or update

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

See Also:

  • “DBA_FLASHBACK_TXN_REPORT”

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_FLASHBACK.TRANSACTION_BACKOUT procedures


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