I\'m trying to perform some offline maintenance (dev database restore from live backup) on my dev database, but the \'Take Offline\' command via SQL Server Management Studio is
In SSMS, set the database to read-only then back. The connections will be closed, which frees up the locks.
In my case there was a website that had open connections to the database. This method was easy enough:
Database Read-Only
to True