Just look up "Create Trigger". Not for replication is a standard option
fro triggers and identity columns.
Robert Davis
-----Original Message-----
From: Indra Timilsina [mailto:[Email address protected]
Sent: Monday, January 30, 2006 12:02 PM
To: Robert Davis
Subject: RE: create trigger on replicated table (sql 2000 merge
replication)
Hi Robert,
Thank for information. I tried to search on BOL and other group before I
posted to DBA group. Could you please give me location in BOL for this
(creating trigger in replicated table). I wanted to try in test
environment before I go in production server.
Thanks.
Indra.
-----Original Message-----
From: Robert Davis [mailto:[Email address protected]
Sent: Monday, January 30, 2006 11:54 AM
To: Indra Timilsina
Subject: RE: create trigger on replicated table (sql 2000 merge
replication)
**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email, **and removed
any attachments, and kept your email address secret **from this person,
and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal **Anything below this line is the original email text
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
[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