简体   繁体   中英

Errors restoring a Sql Server 2008 database with Merge Replication

I'm trying to restore my database from a file and get the following error:

"An explicit DROP INDEX is not allowed on index..." "It is being used for PRIMARY KEY constraint enforcement."

If I delete the primary key and create a new backup it restores fine.

Unique things about the primary key: --It is on a GUID with default NEWSEQUENCIALID() --It is used for merge replication

Some tables with identical primary key structures are restored just fine. But there are 2 tables that result in the above error when I set the primary key.

I know this is a 4 months old anwer but somebody might find it useful. I had the same issue restoring a .bak file of a database with merge replication, you need to go to options and check the "WITH KEEP_REPLICATION" option, then restore your database as usual. The restore process shall success.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM