Site icon Database Tutorials

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.

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.

Exit mobile version