.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
7.07.2004

 
SQL Replication - Could not Delete DB
After playing with replication, and then wanting to stop it and drop the db, SQL Ent Mgr was complaining: can't delete database since it's currently being used as a distributor. (DB icon in the server list shows "shared" hand)

In the Ent Mgr GUI, right click replication, choose "disable publishing". Follow wizard.
(This did not work for me -- error: distribution database is in use)

Thanks to google groups for the following 3 SPs to do this manually:

sp_removedbreplication 'dbname'
exec sp_dboption 'dbname','published',false
exec sp_dboption 'dbname','merge publish',false

Now I could drop the DB (notice the "shared hand" is gone).

Google Groups: View Thread "Error 3724: Cannot Drop Database"


Comments: Post a Comment

Powered by Blogger