My Oracle Support Banner

'ORA-02056: 2PC: 2PC state machine: bad two-phase command number 0 from prepared state(2) Error' Using WebLogic and XA When Reconnecting to the Database after Killing a Previous Connection (Doc ID 331703.1)

Last updated on APRIL 09, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 10.1.0.2 [Release 9.2 to 10.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Using BEA Weblogic and XA to connect to an Oracle database results in problems when the connection
to the database is killed. The transaction rolls back properly, but the next attempt to connect
to the database results in ORA-1591 'lock held by in-doubt distributed transaction' and ORA-2056
'2PC: 2PC state machine: bad two-phase command number 0 from prepared state(2)' error.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.