Unable to drop the database after dropping the republication using store procedure!!HELP !! HELP -
01-26-2005
, 10:01 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 |