Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 5th, 2007, 04:44 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik Send a message via Skype™ 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.
Reply With Quote
  #2 (permalink)  
Old July 5th, 2007, 06:03 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
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


Reply With Quote
  #3 (permalink)  
Old July 5th, 2007, 07:51 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
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
Reply With Quote
  #4 (permalink)  
Old July 11th, 2007, 01:44 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik Send a message via Skype™ 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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Triggers? prabodh_mishra Oracle 2 March 30th, 2006 04: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



All times are GMT -4. The time now is 09:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.