Sample Header Ad - 728x90

SQL Server Cannot drop database <dbname> because it is currently in use... but no sessions displayed

96 votes
6 answers
269517 views
When I try to drop a database I get the error "Cannot drop database "dbname" because it is currently in use". However, when I run sp_who2, there are definitely no sessions connected to this database. I've also set the database to single_user mode with rollback immediate. Why is this happening?
Asked by tuseau (1895 rep)
Apr 27, 2011, 10:39 AM
Last activity: Oct 23, 2024, 10:58 AM