Following error is very generic error and I have previously written SQL SERVER – FIX : Error : 3702 Cannot drop database because it is currently in use.
Msg 3702, Level 16, State 3, Line 2
Cannot drop database “DataBaseName” because it is currently in use.
One of the reader Dave have posted additional information in comments. I will list his advise here. First read the original post here.
If you are still getting the error after you try using
USE master
GO
DROP DATABASE (databaseName)
GO
Close SQL Server Management Studio completely. Open it again and connect as normal. Now you will be able to drop the database with
USE master
GO
DROP DATABASE (databaseName)
GO
Reference : Pinal Dave (https://blog.sqlauthority.com)
11 Comments. Leave new
Works for me.
thanks
there is error
THANKS
If you have any process running ( which connects to SQL server), this error message will come. check your processes.
Thanks it works for me
ALTER DATABASE [dbName]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
DROP DATABASE [dbName]
Go
Regards,
Mazhar Karimi
Hey this one here worked for me. SQL server instance on another machine, not just on my local one.
Thanks man it totally worked :)
Worked for me
This one worked for me too
I get
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database ‘xxx’. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.