Resuming Suspended Database Mirroring in SQL
Database mirroring is a feature in SQL Server which is creating and maintaining the redundant copies of the database. The purpose behind database mirroring is continuous data availability and minimizes the loss of the data. Redundancy ensures that there is always a one backup copy of the database should remain accessible at the time of updates.
Basically mirroring feature in SQL Server is able to stand the random failures at the several parts when the user is linking between the two servers. It has some in-built techniques which are not affected to the outside world. SO the SQL Server user can reboot the servers, connect and reconnect to the link and after that the database mirroring can still be resumed afterwards.
Causes for Database Mirroring Pause
- No storage space in the primary storage.
- SQL Server not working properly.
- The main database is not connected to the mirrored database link.
So, an error is shown to the user while they are performing the database mirroring and all of a sudden it pauses.
Methods to Fix Database Mirroring Pause?
The above error occurs when the mirror server is running out of the space. The SQL Server user will be able to resume the mirroring as soon as the user frees some space. It means that there is no storage left in the primary storage, so in order to resume the database mirroring the user will check if they have any space in the secondary storage then they will free up all the primary storage and store it to the secondary database in order to resume the database mirroring.
Steps to Resume the Database Mirroring In SQL Server
Here are the steps to resume database mirroring using SQL Server Management Studio:
- First, at the time of database mirroring connect to the principal server instance inside Object Explorer and then click on the server name to expand the server tree.
- Second, expand the databases and click on the database.
- Third, now right click on the database and select Tasks and after that click on Mirror. It will open the mirroring page of the Database properties dialog box.
Fourth, if the database is already pause then click on Resume button to resume the database mirroring.
Steps to Resume the Database Mirroring Using Transact-SQL
- Connect to the database engine of the either partner.
- Click on New Query for the standard bar.
- Now Enter the following Transact-SQL query in order to resume the database mirroring:
ALTER DATABASE testdb SET PARTNER RESUME;
By the use of this command the user can resume the database mirroring when it was paused.
We discussed what is database mirroring and why it is important. In addition, we discussed about what are the causes for database mirroring pause and gave an example for it. We also gave some steps to resume database mirroring using any one of the two platforms. Database mirroring is an important thing as it backups the copy of the database and can be maintained easily at the time of loss of the data or loss of the database file.
27 thoughts on “How to Resume Suspended Database Mirroring in SQL Server ?”
Good article, Vivek. Easy to understand.
very well explained regarding Suspended Database Mirroring…