Execute a distributed transaction for an Oracle linked server using SQL Server 2000
I'm trying to execute a distributed transaction for a single Oracle linked server using SQL Server 2000, I came up with the following script:
BEGIN DISTRIBUTED TRANSACTION;
SET XACT_ABORT off;
GO
SELECT MAX(DEPTNO)+1,
FROM [WSF08_CONTA_ORADATA_II]..[SCOTT].DEPT
SET XACT_ABORT on;
GO
COMMIT TRANSACTION;
As soon as the script is ran I get the following errors followed by SQL Management studio freezing and closing the connection.
Msg 7399, Level 16, State 1, Line 3
The OLE DB provider "OraOLEDB.Oracle" for linked server "WSF08_CONTA_ORADATA_II" reported an error. The provider reported an unexpected catastrophic failure. Msg 7303, Level 16, State 1, Line 3 Cannot initialize the data开发者_运维技巧 source object of OLE DB provider "OraOLEDB.Oracle" for linked server "WSF08_CONTA_ORADATA_II".
What is going on?
*P.D:
- I can create/update/delete data using regular queries but error shows up when the
DISTRIBUTED TRANSACTION
clause is involved. - We recently upgraded or linked servers to Oracle 10g, It is worth to mention that I did not run into issues we were using 9i.
To enroll SQL Server and Oracle in a distributed transaction MSDTC needs to have XA transactions enabled. See Supporting XA Transactions:
When the DTC acts as an XA-compliant transaction manager, Oracle, IBM DB/2, Sybase, Informix, and other XA-compliant resource managers can participate in transactions that the DTC controls.
精彩评论