Site icon Database Tutorials

Cannot drop the database ‘database_name’ because it is being used for replication

 

ERROR MESAGGE:

“Cannot drop the database ‘database_name’ because it is being used for replication. (Microsoft SQL Server, Error: 3724)”

EXPLANATION:

You may encounter an error message when you want to delete a database.

SOLUTION:

If you receive this error message, first make sure that this database is not associated with any Replication topology. Also check that there is no Publication related to this database.

If you still get this error message, then I guess this is a copy of a database already used in Replication and has probably been moved from another instance by backup / restore.

In such a case, you can run the following Stored Procedure to clear the settings related to the Replication in the database:

Exit mobile version