Monday, March 19, 2012

Index not replicated to the device

Hi,

I have a table published on the SQL2K Merger Replication publisher. But when I add an index to the table it's not replicated to the device. I have checked the snapshot folder and the newly added index is already in the .dri file. Any ideas?

Cheers,
Justin
One more thing to add, the index is not replicated to the existing subscriber but it works with new subscibers. Does that mean I have to drop and re-add subscription everytime a new index is added on the publisher?

Justin|||

Justin,

Replication supports a wide range of schema changes to published objects. When you make those schema changes on the appropriate published object at a Microsoft SQL Server Publisher, that change is propagated by default to all SQL Server Subscribers. However, Explicitly adding, dropping, or altering indexes is not supported. That is why you see the index is not replicated to the existing subscriber but it works with new subscribers.

You don't need to drop and re-add subscription every time a new index is added on the publisher, you just need to reinitialize the subscribers. Or you can add the index manually at subscribers Or using sp_addscriptexec to populate the index creation script to all the subscribers.

Hope it helps.

Wanwen

|||Thx, Wanwen.|||One more thing...as there will be no notification from the publisher or exception generated from the device during the replication after a new index is add but not pulled down to the device, is there a way we could know when to reinitialize the subscription?

No comments:

Post a Comment