Site icon Database Tutorials

Cannot drop the database because it is being used for replication

 

You may need to uninstall a replication that you previously installed and drop the database.

You may receive an error if you want to delete the database after removing the related publication and subscription.

In such a case, run the following script and try to delete the database again.

If this method doesn’t work, create another database with the same name on another instance. Take the backup of this empty database, and restore it to the database that you cannot delete with Overwrite(WITH REPLACE) option. After the restore process is finished, try deleting again.

Exit mobile version