modifying primary key on replicated table

  • hi, we are running trans replication and have scripts to alter a replicated table and drop the primary key constraint. Another script later will add a new primary key constraint. How do I accomplish this in a script. I would assume that I need to drop the subscription, drop the article, modify the table, add the article and then add the subscription. Is this correct? Will this force all articles to be reinitialized?

    thanks

  • You are correct in your order of events. You can avoid resynchronizing by applying the same PK change on your subscribers and then resubscribe without synchronization. If you go that route and you're using CALL\MCALL syntax for replicating changes then you'll want to script your replication procs and apply them to each subscriber.

    This blog post explains how:

    http://kendalvandyke.blogspot.com/2008/08/how-to-script-replication-stored.html

    Kendal Van Dyke
    http://kendalvandyke.blogspot.com/[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply