Custom Search . . .

Friday, July 4, 2008

Distributed Transaction (In-doubt Transaction Errors)

In-doubt Transaction Errors:

A transaction is In-Doubt when there is a failure during aspect of the two-phase commit. The following ways Distributed

Transaction Errors occurs.

• A network connection failure or slow between one or more oracle database.


• A server machine running Oracle Software crash.

• An un-handule software error.

You need to force commit or rollback of local, In-doubt transaction; this operation can generate some consistency

problems; you can perform it as per following conditions.

Problem with Two-Phase Commit:

A user application that commits a differed transaction is informed problem area.

ORA-02050: transaction ID rolled back, some remote dbs may be in-doubt

ORA-02051: transaction ID committed, some remote dbs may be in-doubt

ORA-02054: transaction ID in-doubt

Action:

No action required by DBA of any node that has one or more in-doubt transaction due to System Failure or Network

Failures.

Oracle automatically fixes those errors once network or system failure problem resolved.

Transaction Time-outs;

A DML statement that require locks on remote database can be blocked by another transaction own locks on the request

data. If the locks continue to block transaction following reason we should be face below error message.

1. Timeout occurs

2. Oracle roll-back the statement

3. Oracle returns the error message.

ORA-02049: time-out: distributed transaction waiting for lock

Action:

As a DBA; should be check any DEAD LOCK occurs in application or any DML locks occurs in database.

Locks Perform In-doubt Transaction:

A query DML statement that require locks on local database can be blocked indefinitely due to in-doubt transaction then
only these errors occurs.



ORA-01591: lock held by in-doubt distributed transaction identifier

Action:

A user should be inform to DBA; because oracle rollback SQL statement immediately;


Manual Commit in In-doubt Transaction:

DBA_2PC_PENDING data dictionary view to gain information about the in-doubt transaction.

No comments: