473,503 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL to Oracle update trigger fails due to distributed transaction error 7391

Hi,

I am having a hard time creating a Trigger to update an Oracle
database. I am using a SQL Server 2005 Express database on a Win XP Pro
SP2 desktop, linked to an Oracle 10g database on a remote Windows 2003
server. Both machines are on the same domain and very close physically
(<1ms ping).

I have set up the Oracle linked server in SQLEXPRESS, added the
login/pw information, and I can execute select and update queries
successfully using both four-part naming and OPENQUERY.

Here is the actual trigger that I created:

USE [AdventureWorks]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [MyTrigger]
ON [Person].[Contact]
AFTER UPDATE
AS

BEGIN DISTRIBUTED TRANSACTION
SELECT * from oradb..schema.table
WHERE username = 'user'
COMMIT TRAN

However, when I update a row in AdventureWorks.Person.Contact, there is
a lag of about 2 seconds, and then I receive an error 7391 with the
following message: "The operation could not be performed because OLE DB
provider 'MSDAORA' for linked server 'oradb' was unable to begin a
distributed transaction."

Now, when I remove the "BEGIN DISTRIBUTED TRANSACTION" and "COMMIT
TRAN" from the trigger, I can update the row without any delay or error
message.

(Don't pay attention to the fact that the triggered action is a SELECT
statement. It also fails with an UPDATE statement, whether or not I use
"BEGIN DISTRIBUTED TRANSACTION." I thought using the SELECT statement
illustrates the problem more clearly.)

If I replace the triggered code with an update to a SQL Server database
on that same server (even using "BEGIN DISTRIBUTED TRANSACTION"), then
it works correctly. This leads me to believe that MS DTC is configured
properly on both machines. There is no firewall between the two
machines, and I can Telnet from the desktop to the database server on
port 135.

I have gone through many MSKB articles (280106, 839279, 329332, 259959,
193893, "Troubleshooting Oracle Publishers" from BOL), and archived
newsgroup posts but have been unable to find any resolution for this
problem. I would appreciate any assistance you may provide.

Best regards,
George

Jun 22 '06 #1
0 2993

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
13889
by: Prashanth | last post by:
Hi, We are facing some issues in COM+ deployment. We get system error "Unable to enlist in a distributed transaction" . It has a very inconsistant behaviour. On refreshing the screens couple of...
2
11721
by: Elvira Zeinalova | last post by:
Hei, We have 2 MS SQL SERVER 2000 installed on 2 different servers (2 separated machines). I am triing to connect them så that when one row is added to the table in the database in main server - ...
4
3959
by: Abram Friesen | last post by:
Hi, I'm a developer for a software application vendor, and our application makes use of a customer-maintained Oracle 8i/9i database. We've had a customer request to support DB2 database, and I'm...
7
24669
by: Altemir | last post by:
I want to create an UPDATE statement that updates a value in a table in database A based on the results of an inner join between tables each residing in deifferent databases. What is the correct...
1
6750
by: ammar_fake | last post by:
Hello! I have an Oracle linked server connected through MSDAORA. Linked server queries work perfectly - the "openquery" ones as well as the 4-part-named ones. The problem I have is with...
1
3276
by: zabihi | last post by:
Hi, I have set up a linked server between sql 2000 and oracle9i database using MSDAORA. Linked server works fine for selecting data from oracle database . I want to save a query in Sql server that...
19
4008
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! I'm using DB2 database on one server and ORACLE database on the second one. I want to move some data from ORACLE database to DB2 database and update some columns on ORACLE database so I know...
16
3462
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
2
14207
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.