RE: create trigger on replicated table (sql 2000 merge replication)

RE: create trigger on replicated table (sql 2000 merge replication)

 

  

You have to use "Not For Replication" in the create statement. This
tells it to ignore changes made by replication. See Books Online for
more info.

For example:

CREATE TRIGGER MyTable_UTrig ON dbo.MyTable
FOR UPDATE
NOT FOR REPLICATION AS
-- Automatically update the modification time unless that field was set
explicitly
if not update(ModTime)
update MyTable set ModTime = getdate() where MyTableID In (select
MyTableID from inserted)




Robert Davis


-----Original Message-----
From: Indra Timilsina
[mailto:mssqldba-ezmlmshield-x41179154.[Email address protected]
Sent: Monday, January 30, 2006 7:03 AM
To: LazyDBA Discussion
Subject: create trigger on replicated table (sql 2000 merge replication)



Hi there,



I am using merge replication on with sql 2000 and msde. I need to create
trigger on one of the replicated table, but wondering whether it will
create problem on my merge replication or not. If any one has done this
could you please give me information?



Thanks.

Indra.





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page