{"id":155,"date":"2012-04-18T11:12:58","date_gmt":"2012-04-18T11:12:58","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2012\/04\/18\/cannot-drop-database-because-it-is-currently-in-use\/"},"modified":"2012-04-18T11:12:58","modified_gmt":"2012-04-18T11:12:58","slug":"cannot-drop-database-because-it-is-currently-in-use","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2012\/04\/18\/cannot-drop-database-because-it-is-currently-in-use\/","title":{"rendered":"cannot drop database because it is currently in use"},"content":{"rendered":"
When you try to drop a database you get the below error: How to drop database when this error occurs?<\/strong> 2. Check if you are using the same database connection and trying to drop it.
\n
\nMsg 3702, Level 16, State 3, Line 1
\nCannot drop database \u201cDataBaseName\u201d because it is currently in use.
\n<\/font><\/p>\n
\n1. Check if you are using the database you are trying to drop
\n– Close all the SQL Server management studio windows that are open
\n– Re-Connect to the server
\n– Try to drop the database.<\/p>\n
\n– Change the database in the connection and try to run the drop statement.<\/p>\n