ra_dumptran

(Oracle only) This command returns information for use in troubleshooting a specified database transaction.

Note: This command is available only for Oracle.

Syntax

ra_dumptran "{ opid | locator | tranid }"

Parameters

Examples

Usage

  • The ra_dumptran command dumps all operations for a specified transaction to an exclusive log file used in troubleshooting a failed operation or transaction. The log-file header consists of the result set returned by ra_dumptran and includes the following rows:

    • BEGIN OPERATION ID – the Replication Agent operation ID for the transaction begin operation. This field is in the format wrap.scn.subscn.thread.lsn.block.offset, where:

      • wrap.scn.subscn is the system change number (SCN) for the begin operation.

      • thread is the database thread number.

      • lsn is the log sequence number for the begin operation.

      • block is the block where the begin operation resides.

      • offset is the offset into the operation where the begin operation resides.

    • BEGIN SCN – the SCN for the transaction operation as logged in a redo log file.

    • TRANSACTION ID – the ID of the transaction that the operation is a part of.

    • USERNAME – the name of the user that executed the transaction.

    • EXECUTION TIME – the date and time at which the transaction was executed.

    • THREAD NUMBER – the Oracle thread that executed the transaction.

    • TRANSACTION SKIP COMMAND – the Replication Agent command that causes the transaction to be skipped by Replication Agent during replication.

    • DUMP FILE NAME – The name of the log file to which the transaction is written by ra_dumptran.

  • The log file specified by the DUMP FILE row also contains the operation results for the specified transaction:

    • SCN – the SCN for the operation as logged in a redo log file.

    • THREAD – the thread that executed the operation.

    • OPERATION ID – the Replication Agent operation ID for the transaction begin operation. This field is in the format wrap.scn.subscn.thread.lsn.block.offset.

    • OBJECT ID – the object ID of the affected object.

    • OBJECT NAME – the name of the affected object.

    • REPLICATE – whether or not (YES or NO) the object affected by the operation is marked for replication by Replication Agent.

    • OPERATION – the operation type.

    • SQL – the SQL statement for the operation.

  • The ra_dumptran command cannot operate properly unless the Oracle LogMiner script, $ORACLE_HOME/rdbms/admin/dbmslm.sql, has been installed at the primary database. If this script has not been installed, ra_dumptran will return an error.

  • After LogMiner is installed, create a public synonym so that you do not have to log in as the owner to execute LogMiner functions:
    CREATE PUBLIC SYNONYM DBMS_LOGMNR FOR
       SYS.DBMS_LOGMNR;
    Note: This is required if you are using Oracle 10g.
  • The following privileges must be granted to pds_username for the ra_dumptran command to function properly:

    • EXECUTE_CATALOG_ROLE

    • SELECT ON V_$LOGMNR_CONTENTS

    • SELECT ON V_$LOGMNR_LOGS

    • SELECT ANY TRANSACTION

  • If the ra_dumptran command returns no result for a specified opid or locator value, the corresponding database operation may be one of many operations in a database transaction. In this case, you should instead specify the ID of the transaction to which the database operation belongs.