Tuesday, March 27, 2012

dropping database that had replication

Usually I use Enterprise Manager to remove the Merge Replication info before
trying to drop a database.
Now I used sp_dropmergepublication and successfully dropped the merge
publications associated with a database. When I try to do a DROP DATABASE
though, I receive :
Server: Msg 3724, Level 16, State 3, Line 1
Cannot drop the database 'xxxxxx' because it is being used for replication.
I cannot find what stored procedure(s) or other process I need to do to
remove any remaining replication info so the drop database will work.
TIA,
Doug
Doug,
please try sp_removedbreplication 'dbname'
failing that, sp_dboption 'dbname', 'merge publish','false'
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment