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

本站中文解释

Oracle的视图DBA_FLASHBACK_TXN_STATE用于显示当前有效的回滚操作的事务ID,以及它们的回滚状态信息。可以使用这个视图来确定回滚事务的状态,查看是否在执行Flashback Transaction的回滚过程中发生错误。

要使用DBA_FLASHBACK_TXN_STATE视图,必须在该视图权限列表中有SELECT权限,而且服务器必须已经打开。要查看某个事务ID正在执行Flashback Transaction回滚操作的状态,可以使用下面的查询:

SELECT * FROM DBA_FLASHBACK_TXN_STATE WHERE txn_id = ;

这条查询将显示回滚使用的事务ID,以及它们运行的状态:

STATUS:表示Flashback Transaction回滚的当前状态
MESSAGE:表示回滚操作的结果消息,如果发生错误,则显示错误信息
ERROR_CODE:表示发生错误时的错误代码

官方英文解释

DBA_FLASHBACK_TXN_STATE displays information about the compensating status of all transactions in the database.

For each compensating transaction, there could be multiple rows, where each row provides the dependency relation between the transactions that have been compensated by the compensating transaction.

Related View

USER_FLASHBACK_TXN_STATE displays information about the compensating status of the transactions owned by the current user. This view does not display the USERNAME column.

Column Datatype NULL Description

COMPENSATING_XID

RAW(8)

Transaction ID of the compensating transaction

XID

RAW(8)

A transaction that has been compensated by the compensating transaction

DEPENDENT_XID

RAW(8)

A dependent transaction of XID

Note: In the case of BACKOUT_MODE = CASCADE, there must be another row with XID = DEPENDENT_XID of this column.

BACKOUT_MODE

VARCHAR2(16)

Mode in which XID was backed out:

  • NOCASCADE

  • NOCASCADE_FORCE

  • NONCONFLICT_ONLY

  • CASCADE

USERNAME

VARCHAR2(128)

NOT NULL

User who is performing the compensating transaction

See Also:

“USER_FLASHBACK_TXN_STATE”


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