![ms clean up ms clean up](https://cdn.standards.iteh.ai/images/70810/9d65359392684183b1b149e17f0bab0a/page3.jpg)
Other than trying to hack through the system tables to remove all traces of replication, you just need to recreate the publication and run the above clean up script again to drop replication and let SQL Server do the complete clean up. Now, this is an easy part, but very important as well. You can cleanup many processes to drop the Log Reader and Distribution agent jobs, but even after that if you query the "" table you often still see that records exist. However, if you just restore the database on top of an existing replicated database as shown below, you get orphan replication configurations. In this case, you must recreate all publications and subscriptions after backups are restored." If you restore a backup of a replicated database to another server or database, replication settings cannot be preserved. As Books Online mentions "Replication supports restoring replicated databases to the same server and database from which the backup was created. Typically, when I restore the production replicated database onto the Test environment, I cleanup all the publications to make sure all traces are moved and then I reconfigure replication for the Test environment. Our production environment is very replication intensive and we want to have our Test environment mimic Production as much as possible. By: Kun Lee | Updated: | Comments (6) | Related: More > ReplicationĪs with many companies, we are trying to make our Test environment as close to our Production environment as possible.