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.
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...