SQL Server – Can an Offline Database Be in Use?

offlinesql server

I have a SQL Server 2014 DB where the log file filled up the disk. Since it was a test db, we decided to just delete the whole database. We took it offline, but when we try to drop it, we get a message that it cannot be dropped since it is in use.

How can it be in use when it is offline?
How can I get it dropped? (Preferable without taking it online.)

Best Answer

The problem was that the person who set the database to OFFLINE also set it to SINGLE_USER, and his session was still open and "using" the database, even if it was OFFLINE. When he closed that session we were able to drop the database.

Thx to everyone in the comments for helping.