ORA-01591 lock held by in-doubt distributed transaction

 

With the DB link, you can get an ORA-01591 error if you join the tables in the queried database with the tables in a remote database. This error occurs because there are hanging processes.

In the queried database, transactions that appear in the “prepared” state in the DBA_2PC_PENDING view must be committed or rollback.

You can query information about pending transactions from the following tables and views.

  • SYS.PENDING_TRANS$
  • SYS.DBA_2PC_PENDING
  • SYS.DBA_2PC_NEIGHBORS

Preparing rollback commands for pending processes:

The following query can prepare rollback force commands for pending transactions.

Preparing commit commands for pending operations:

The following query can prepare commit force commands for pending transactions. The commit process may not always complete successfully.

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *