x

Trigger while Replication

Can trigger be invoked while replication? I have tried after replication its working fine.But i need to know while replication is it possible..
more ▼

asked Feb 29, 2012 at 02:55 PM in Default

mahesh.kumar gravatar image

mahesh.kumar
1 1 1 1

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first
Triggers are invoked by events like insert delete update.
more ▼

answered Feb 29, 2012 at 04:43 PM

inder gravatar image

inder
211 17 19 22

(comments are locked)
10|1200 characters needed characters left

Yes, a trigger can be invoked during replication. You need to mark the trigger NOT FOR REPLICATION.

Have a look at [Controlling Constraints, Identities, and Triggers with NOT FOR REPLICATION][1].

[1]: http://msdn.microsoft.com/en-us/library/ms152529.aspx
more ▼

answered Feb 29, 2012 at 05:36 PM

willibrandon gravatar image

willibrandon
11

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x305
x120

asked: Feb 29, 2012 at 02:55 PM

Seen: 761 times

Last Updated: Feb 29, 2012 at 05:36 PM