Thursday, December 5, 2013

Restoring SQL Server Database and Getting out of Standby/Read-only mode

You database might be Standby/Read-only mode after restoring your database in SQL Server.

The solution is:

  1. Click on New Query
  2. Select 'master' as your database
  3. Run the following script

RESTORE DATABASE <db_name> WITH RECOVERY



Hint: Replace <db_name> with the name of the database. 

In case your database name has space or special characters or space, write it inside square brackets [db_name].

To know more about restoring SQL Server 2012 databases, read Katie's and Emil's blog.

More info can be found from Microsoft's documentation here.