MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Unable to begin a distributed transaction
Posted by: Thomas Noglik
Date: April 03, 2009 05:29PM

hi,

i think i found a workaround.
In the trigger i switched off the implicit transaction. After i setted the xact_abort to ON i committed the transaction (COMMIT).

A small example:

SET IMPLICIT_TRANSACTIONS OFF
GO
ALTER TRIGGER [dbo].[my_table_trigger]
ON [dbo].[my_table]
FOR INSERT
AS
SET XACT_ABORT ON
COMMIT
INSERT INTO OPENQUERY(STAGING,'select * from test')
Select 1234

But donĀ“t ask me what will happen in the case of rollback or other transaction

Tom



Edited 1 time(s). Last edit at 04/03/2009 05:49PM by Thomas Noglik.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.