"Cannot drop database 'MyDatabaseName' because it is currently in user".
To resolve this error, alter the database first before deleting the database like below..
USE [master]
GO
ALTER DATABASE [MyDatabaseName] set single_user with rollback immediate
DROP DATABASE [MyDatabaseName]
GO
No comments:
Post a Comment