Recover Database From Warm-Standy Mode

Introduction

Some times you may get database error'Failed to update database because the database is read only' while inserting data into database or update the database, The reason is that your database might be in Warm-Stand by Mode or read only mode. The article describes how to recover database when the database is in Warm-Standby Mode.

Getting Started

When your database is in Warm-Standy Mode and to recover from this, first you need to move or change from current database(the database you want recover) connection to master database connection. Then you need to kill the database existing database (Current) user and then you have to restore the database.

After restoring the database, again you need to set the user of the database. Here bellow is the all the code syntax of SQL that recovers database from Warm-Standy Mode.

Killing Current Database User

 ALERT DATABASE database-name SET SINGLE_USER WITH ROLLBACK IMMEDIATE;  

Complete Recovering Database

 RESTORE DATABASE database-name WITH RECOVERY  

Setting Database Users

 ALERT DATABASE database-name SET MULTI_USER WITH ROLLBACK IMMEDIATE;  

Related Articles

  1. Enable SQL Remote Connection
  2. Encrypt data across communication channels
  3. List Out Store Procedures That Executes Frequently
  4. Install certificate to enable encrypted connections to the Database Engine in SQL Server
  5. Create SQL Job in SQL Server 2017“

Summary

This article described the syntax, how to recover database from Warm-Standy Mode. I hope this article may help you.

Thanks

Kailash Chandra Behera

An IT Professional with 12 years experience in development life cycle in windows, service and Web based application using Microsoft.Net technologies. Proven record of developing all phases of projects in Microsoft.Net technology from initiation to closure aligning with the company's Business objectives to drive process improvements, competitive advantage and bottom-line gains. -> Good exposure of independently working and developing multiple projects ->Committed to efficient and effective development of projects in a fast-paced and deadline driver environment. Skill :- Develop and design projects in various technologies of Microsoft Technology. Total IT Experience- 13+

Previous Post Next Post

نموذج الاتصال