Group: General Forum Members
Last Login: Monday, March 31, 2014 4:07 AM
Between LINKED sqlserver 2008 R2 on win7 client (A) and sqlserver 2008 R2 (B) I can execute T-sql from query builder in A using select, delete and inserts toward B .... everything is fine.
But when I try the same sql in a trigger (on DELETE, INSERT) on A it fails.
Both delete and insert result in following message:
OLE DB provider "SQLNCLI" for linked server " " returned message ""The transaction has already been implicitly or explicitly committed or aborted .".
Msg 7391, Level 16, State 2, Line 40
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "" " was unable to begin a distributed transaction.
I have configured MSDTC on both computers to allow incoming and outgoing and no authentification - same result when trigger fires.
The trigger is:
CREATE trigger [dbo].[DelKnudeGeomDistributed]
ON [dbo].[ddg_knude_geomtxt] FOR DELETE
DECLARE @n1 int;
DECLARE @n2 int;
select @n1 = count(*) from inserted;
select @n2 = count(*) from deleted;
delete from "SERVERNAME".DB.dbo.ddg_knude_geomtxt where id in
(select id from deleted d)
help will be apreciated SO MUCH.