Monthly Archives: April 2017

Getting exclusive access to a SQL Server database for restore Overview When restoring a database, one of the things you need to do is ensure that you have exclusive access to the database.  If any other users are in the database the restore will fail. Explanation When trying to … Continue reading

Posted in sql.server | Tagged | Leave a comment

Recovering From SQL Server ‘recovery pending’ Status

Seeing a database in any state other than “online” makes me a little nervous. For one thing, it’s one of those things I don’t see often, so I have to rub a few brain cells together to remember what I … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Get the SQL Server database in the normal state

SQL Server Management Studio reports a database in “Recovery Pending” status. USE master ALTER DATABASE [dbname] SET OFFLINE WITH ROLLBACK IMMEDIATE ALTER DATABASE [dbname] SET ONLINE WITH ROLLBACK IMMEDIATE

Posted in Uncategorized | Tagged , | Leave a comment