all groups > sql server replication > january 2005 >
You're in the

sql server replication

group:

Unable to drop the database after dropping the republication using store procedure!!HELP !! HELP


Unable to drop the database after dropping the republication using store procedure!!HELP !! HELP Paul Ibison
1/27/2005 1:45:55 AM
sql server replication:
You could try something like:
ALTER DATABASE databaseName SET SINGLE_USER WITH ROLLBACK
IMMEDIATE
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Unable to drop the database after dropping the republication using store procedure!!HELP !! HELP victor
1/27/2005 5:01:14 PM
hi there:
i got a big problem here. i call serval store procedures from c# to drop a
republication. the code likes following


use [databaseName]
GO

-- Dropping the merge publication
exec sp_dropmergepublication @publication = N'database_Publication'
GO

-- Disabling the replication database
use master
GO

exec sp_replicationdboption @dbname = N'databaseName', @optname = N'merge
publish', @value = N'false'
GO


use master
GO

exec sp_dropdistributor @no_checks = 1
GO


after that when i try to use "drop database databaseName" to drop the
database. the sql server didnt allow me to do that.
the error message is "can not drop the databaseName, because it is currently
in use".

I close the connection everytime i excute one command.

anyone can help?
cheers




AddThis Social Bookmark Button