| There are two databases on two web servers, db01 is on server01, db01_replica is on server02, db02 is on server02, db02_replica is on server01. db01 and db02 are both for one system. Each time after doing performance test, I have to recover databses. I copy the data files in a folder, try to use detach and attach to recover databases. But with two replication dbs, I don't know how to do it. The replication db should also be recovered. |

How to detach replication dbs?
Heilke
Florian 0.
Detach/attach is breaking the link between replication and these databases.
Depending on some specifics, there may be several ways to get what you want to do.
First, knowing what version and edition will tell us what tools we have to work with.
Off the top of my head, you could tear down your replication setup, detach/attach, and recreate the replication config. Not pretty, but you could automate it with scripts.
You can use backup/restore instead of detach/attach.
You could possibly create database snapshots of all the databases, and then to reset use RESTORE DATABASE <dbname> FROM DATABASE_SNAPSHOT=<snapshot name> to limit the amount of data being moved.