Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA-02074: cannot ROLLBACK in a distributed transaction

2 views
Skip to first unread message

Vivek

unread,
Jan 22, 2004, 4:21:08 PM1/22/04
to
Hi,

I am familiar with the error message "ORA-02074: cannot ROLLBACK in a distributed transaction". This is happening because I am calling a ROLLBACK from a Oracle Stored Procedure. But the main problem is there is no distributed transaction initiated. Infact I duplicated it without DTC (I shut down the service). My question is, where is this distributed transaction getting initiated?

Following is my configuration.

Windows 2000
VS 2003, .NET framework 1.1
Microsoft Oracle driver.
Oracle 9.2

I was successfully running the exact same stored procedure with VB, COM+ (with NoTransactions) and ADO 2.7 for a long time. The problem is occuring only when I ported this to .NET.

I appritiate you help.

-thanks
-Vivek.

Angel Saenz-Badillos[MS]

unread,
Jan 22, 2004, 11:46:10 PM1/22/04
to
This is unfortunately a known problem, there is a QFE ready which you can
get by contacting PSS for Q830173, you also need to add a new keyword to the
connection string, (please verify with PSS what the actual string is). As
part of this workaround you cannot use Distributed Transactions on that
particular connection.

The problem is that when we added support for distributed transactions in
v1.1 we run into a known Oracle 8i bug (#914652). To be able to enlist a
connection into a distributed transaction we need to set
OCI_ATTR_EXTERNAL_NAME and OCI_ATTR_INTERNAL_NAME, this works fine when
connecting to oracle 9x, but when connecting to Oracle 8x you run into
problem with this type of stored procedures:

CREATE OR REPLACE PROCEDURE TESTTHISBUG
(pstrCOMPID IN Number) AS BEGIN
Update Customers set Company_name = 'asdf' where CustomerID = pstrCOMPID;
ROLLBACK;
END;


When we try to execute this stored procedure in an 8x server we will get the
exception you are seeing when we get to the ROLLBACK statement. The data
providers that oracle develops including odp.net apparently all implement a
similar workaround where these settings are disabled for this configurations
(or so they tell us) so it probably means that this bug will not get fixed
any time soon.

Hope this helps.
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.

"Vivek" <anon...@discussions.microsoft.com> wrote in message
news:1B18755A-9D88-4E38...@microsoft.com...

0 new messages