I am trying to figure out the proper procedure to overwrite a database with a backup of a database created on a different server. The backup has an identical schema, full text indexes, stored procs, etc. The only thing that differs is the data. The user table current replicates to another database, so I need to restore this database while maintaining this replication. Any tips on how I can do this?

Thanks in advance for your assistance!

migrated from stackoverflow.com Apr 26 '11 at 11:18

This question came from our site for professional and enthusiast programmers.


You'll have to tear down replication and build it back up again (along with reinitializing any subscribers). The easiest/most reliable way to do this is through T-SQL scripts. To drop, it's going to be calls to sp_dropsubscription, sp_droparticle, and sp_droppublication and to re-add it's going to be sp_addpublication, sp_addarticle, and sp_addsubscription. Good luck... you'll learn lots!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy