Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15264

Can't drop DB because is is "currently in use" -- not apparently so!

$
0
0

Setting: sql 2008, SP3. Have a Database, Test, with no "apparent" connections  (Its name does not appear in DBName under sp_who2)

drop database Test gives

"

Msg 3702, Level 16, State 4, Line 1

Cannot drop database "Test" because it is currently in use.

"

But this worked fine:

USE master;
GO
ALTER DATABASE Test
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
DROP DATABASE Test;

>>> Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.

Any ideas as to the actual  source of the problem is?  (e.g. could there be a "service" accessing the DB that would not show up under sp_who2? Don't know what a "Nonqualified transactions" is either.)

TIA,

edm2



Viewing all articles
Browse latest Browse all 15264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>