Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2007, 04:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default triggers in replication

hi all:
My app running fine & Im going to distribute d data using Merge Replication SQL Server 2000 (SP4).
My problem is with tables that have trigger on INSERT.
when its replicate tiggers again fire (I guess) & it makes Conflict for my replicated Data. so I guess i should stiop triggers in this step so I set this in my triggers to not fire in Repication but i still have problem do u have any idia?

Code:
    if sessionproperty('replication_agent') = 1 
        return


Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
 
Old July 5th, 2007, 06:03 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

hey...try these links

http://msdn2.microsoft.com/en-us/library/aa237102(SQL.80).aspx

http://support.microsoft.com/kb/148819

http://msdn2.microsoft.com/en-us/library/ms152529.aspx


 
Old July 5th, 2007, 07:51 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

you can set triggers "NOT FOR REPLICATION" which will eleviate this problem.



Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old July 11th, 2007, 01:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

yes dear Scott, I completly forgot that, I set it for my IDENTITY & Constraints but forgot to do for triggers, tnx to remind. good point

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Triggers? prabodh_mishra Oracle 2 March 30th, 2006 05:51 AM
SQL Server Transactional Replication with Triggers RRNP SQL Language 0 October 4th, 2004 05:18 PM
SQL Server Transactional Replication with Triggers RRNP SQL Language 0 October 4th, 2004 05:17 PM
Replication and Triggers comibnation RRNP SQL Server 2000 2 September 27th, 2004 08:23 AM
About Triggers zee_ahmed2002 SQL Server 2000 2 August 20th, 2004 10:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.