Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find the table or session involved in a stuck distributed transaction

Peasant81Nov 9 2022 — edited Nov 9 2022

DB version: 19c
OS : RHEL 7.9

I have 2 distributed transactions which runs across 2 databases.
These distributed transactions have become in-doubt transactions and hence got listed in dba_2pc_pending view.
Application guys want to know what tables are involved in these 2 transactions that are in 'in-doubt' state now.

Hence I am looking for ways to 'translate' dba_2pc_pending.LOCAL_TRAN_ID like 18.23.245864 listed below to a sid and serial# in gv$session.

SQL> SELECT RETRY_TIME, LOCAL_TRAN_ID, STATE FROM dba_2pc_pending;

RETRY_TIME           LOCAL_TRAN_ID          STATE
-------------------  ---------------------- ----------------
09-11-2022 13:18:32     18.23.245864         prepared
09-11-2022 13:23:16     67.13.356721         prepared
Comments
Post Details
Added on Nov 9 2022
2 comments
827 views