Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Johnnyb Newsgroups: comp.databases.ms-sqlserver Subject: Re: Trigger help Date: Thu, 5 Apr 2012 06:06:04 -0700 (PDT) Organization: http://groups.google.com Lines: 27 Message-ID: <26993464.772.1333631164888.JavaMail.geo-discussion-forums@pbcov6> References: <11931752.1474.1333025246004.JavaMail.geo-discussion-forums@pbjv6> <17890250.1123.1333548317738.JavaMail.geo-discussion-forums@pbcoy7> NNTP-Posting-Host: 134.253.26.11 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1333632621 16198 127.0.0.1 (5 Apr 2012 13:30:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 5 Apr 2012 13:30:21 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=134.253.26.11; posting-account=kYW--QoAAABRuO6dTOz2QITtLsB-PRVZ User-Agent: G2/1.0 X-Received-Bytes: 2454 Xref: csiph.com comp.databases.ms-sqlserver:958 Even with 'AFTER' I get this in my replication monitor: Command attempted: if @@trancount > 0 rollback tran (Transaction sequence number: 0x00000771000FB566000300000000, Command ID: 1) Error messages: The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "DB02TSSNT" was unable to begin a distributed transaction. (Source: MSSQLServer, Error number: 7391) Get help: http://help/7391 The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "DB02TSSNT" was unable to begin a distributed transaction. (Source: MSSQLServer, Error number: 7391) Get help: http://help/7391 On Thursday, April 5, 2012 1:08:12 AM UTC-6, Erland Sommarskog wrote: > Gene Wirchenko (genew@ocis.net) writes: > > I do not know quite enough to be sure, but I believe that your > > trigger's insert is replacing the insert/update. I believe you need > > the magic word "AFTER": > > FOR and AFTER are equivalent. > > > -- > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > Links for SQL Server Books Online: > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx