Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3724: Cannot delete the database .. .replication

Status
Not open for further replies.

tjohnsb

Programmer
Sep 9, 1999
14
US
I was restoring a database using T-SQL and received an error that the restore was terminating which resulted in the databse displaying in a loading state in Enterprise Manager. I received the following message when trying to delete the database:

3724: Cannot delete the database otgcopy2 because it is being used for replication.

Replication was not being implemented on the database. Does anyone have any suggestions for how to resolve the problem? Thank you.
 
This sounds like a problem I have encountered. I am guessing here that database otgcopy2 has a 'hand' icon on it when you view it in enterprise manager. If this is the case then this database is still marked as replicated (even though there is no publication) and must have been replicated at one time or another. To remove 'the hand' simply run

sp_removedbreplication 'otgcopy2'

in query analyser and it should remove it. Then you'll be able to delete the database with no problem as the server will no longer think it's being replicated

The article below has more information


JC
 
Thank you for your help.

The database was labeled as LOADING in Enterprise Mannger and there was no hand underneath it. When I tried the statement sp_removedbreplication 'otgcopy2' I received an error message stating that the database was still loading and could not be removed. I even ran a query to see which objects were being replicated and otgcopy2 was not listed.

I was able to resolve the issue by running

sp_dbremove otgcopy2

which removes the database and all of the associated files.

tj

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top