0

I have deployed 1 subscriber and 1 publisher server in merge replication configuration of SQL Server. I added a table along with a trigger on that table on publisher and want to replicate that table and trigger on subscriber. I have set 'replicate schema changes' and 'copy user triggers' to true but still the trigger is not replicated on subscriber.

How can I solve the problem?

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52
NI3
  • 27
  • 1
  • 6

1 Answers1

0

I had a similar problem with merge replication. Despite anything I tried, new schema changes at Publisher were not applied at Subscriber even with Replicate schema changes set to true. In my case it were new columns not propagated to Subscriber even though they were explicitly checked at Publisher to be replicated, instead the following error was returned during sync:

Invalid column name 'new_col_name'. (Source: MSSQLServer, Error number: 207)

I ended up removing merge subscription, adding the new columns at Subscriber and then recreating the subscription. The same may be done to triggers.

Note, after removing and recreating Subscription you may need to re-initialize it which will replace all data in Subscriber's articles. If you want to preserve existing subscriber objects/data make sure to set the article property Action if name is in use to Keep existing object unchanged, see the image below:

enter image description here

HTH

andrews
  • 2,173
  • 2
  • 16
  • 29