ODP.NET Throws Wrong Exception Message With Transactions (Doc ID 1916012.1)

Last updated on DECEMBER 01, 2015

Applies to:

Oracle Data Provider for .NET - Version 11.2.0.3 and later
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)

Symptoms

It is observed that, .NET application using ODP.NET driver doesn't receive the error raised by RAISE_APPLICATION_ERROR in stored procedure.

Instead, it throws Oracle internal error message: ORA-20002: Message 20002 not found; product=RDBMS; facility=ORA.

This issue is identified when a local transaction is promoted to a distributed transaction (by opening a second database connection within the transaction scope).

The problem is start occurring from ODP.NET 11.2.0.3.1 onwards.

 

The issue can be reproduced using the sample code below :

Database Script :

 

 

Note - Complete source code is attached for the issue (SourceCode.txt) 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms