Alter Primary Key of an article in a replicated database

  • We are using Transactional replication and from time to time need to modify tables, etc.

    I am trying to add a primary key to a replicated table and I am getting an error:

    HS Codes' table

    - Unable to delete index 'HS Codes$0'.

    Cannot alter the table 'HS Codes' because it is being published for replication.

    Could not drop constraint. See previous errors.

  • Hi,

    Try this! First remove the article from the publisher and add the primary key to the table,

    Then again publish the modified article in to the publisher database.

    After publishing,re-initialize the synchronization process then it will the replicate the new articles in to subscriber database

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

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