Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_TRANSACTION , 17 of 19
When a failure occurs during commit processing, automatic recovery consistently resolves the results at all sites involved in the transaction. However, if the remote database is destroyed or recreated before recovery completes, then the entries used to control recovery in DBA_2PC_PENDING
and associated tables are never removed, and recovery will periodically retry. Procedure PURGE_LOST_DB_ENTRY
enables removal of such transactions from the local site.
DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY ( xid VARCHAR2);
Before automatic recovery runs, the transaction may show up in DBA_2PC_PENDING
as state "collecting", "committed", or "prepared". If the DBA has forced an in-doubt transaction to have a particular result by using "commit force" or "rollback force", then states "forced commit" or "forced rollback" may also appear. Automatic recovery normally deletes entries in any of these states. The only exception is when recovery finds a forced transaction which is in a state inconsistent with other sites in the transaction; in this case, the entry is left in the table and the MIXED
column has the value 'yes'.
However, under certain conditions, it may not be possible for automatic recovery to run. For example, a remote database may have been permanently lost. Even if it is recreated, it gets a new database ID, so that recovery cannot identify it (a possible symptom is ORA-02062
). In this case, the DBA may use the procedure PURGE_LOST_DB_ENTRY
to clean up the entries in any state other than "prepared". The DBA does not need to be in any particular hurry to resolve these entries, because they are not holding any database resources.
The following table indicates what the various states indicate about the transaction and what the DBA actions should be:
Parameter | Description |
---|---|
xid |
Must be set to the value of the |
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|