SQL Server – Error – “is in warm standby. A warm-standby database is read-only” – Recovery from warm-standy mode

Background

In this post we will go over the steps to take to recover a SQL Server database from warm-standby mode.

 

Steps

Change current connection’s database

use master; 
go;

Kill Database Users

Syntax:


   alter database [database-name] set SINGLE_USER
          with rollback immediate;

Sample:

  alter database [sales] set SINGLE_USER
         with rollback immediate;

 

Complete Recovery

Syntax:


restore database [database-name] with recovery

Sample:


restore database [sales] with recovery

 

“Avail” Database

Syntax:


   alter database [database-name] set MULTI_USER
          with rollback immediate;

Sample:

  alter database [sales] set MULTI_USER
         with rollback immediate;

 

Reference

  1. How to: Set Up, Maintain, and Bring Online a Warm Standby Server (Transact-SQL)
    http://msdn.microsoft.com/en-us/library/ms178034.aspx

7 thoughts on “SQL Server – Error – “is in warm standby. A warm-standby database is read-only” – Recovery from warm-standy mode

  1. It really helped. Just restored my db which was in warm standby mode and now it is online. Thanks

    Regards,
    Alamzeb Nasar

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s