开发者

Execute a distributed transaction for an Oracle linked server using SQL Server 2000

开发者 https://www.devze.com 2022-12-18 07:37 出处:网络
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:

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:

  1. I can create/update/delete data using regular queries but error shows up when the DISTRIBUTED TRANSACTION clause is involved.
  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消