How to find the actual SQL statement with the v$logstdby_transaction.primary_xid (Doc ID 1301409.1)

Last updated on OCTOBER 18, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Goal

The intention of this note is to provide a way to find out what is the actual SQL statement that is running in the Primary database where that primary_xid is identified from the logical standby database.

This should work if:
1) The SQL statement is not age out; and
2) Active session history has captured the information.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms