Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

SQL 2008 Triggers and Merge Replication

$
0
0

I am trying to have a trigger fire when the Merge agent Inserts or Deletes data into / from a table. It is supposed to insert data into a Report table for use with SSRS.

I DO NOT have the "NOT FOR REPLICATION" set in the trigger. Here is the trigger code:

ALTER TRIGGER [dbo].[MyTable_INSERT] 
ON  [dbo].[MyTable] 
FOR INSERT
AS 
BEGIN
    SET NOCOUNT ON;
    INSERT INTO...
END

I have tried FOR INSERT and AFTER INSERT, neither seem to work.

The table structure is usual parent / child, I have the trigger set on the child to make sure the parent is already created. The relationships are secured with FK's.

I'm sure am overlooking something simple. Any ideas ?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>