The mirror server instance is not caught up to the recent changes to database DatabaseName.

To day i got the below error in one of my production environments, we have nearly 400 databases on which we have configured Database mirroring, we got the below error on one my databases today while i am trying to fail over to the other server which is acting as a mirror. Failover failed on this database alone and it is throwing the below error. To mitigate this issue we followed the below steps

First connect to the principal database in which server that particular database acting as  PRINCIPAL
 1) Taken the backup of COPY_ONLY  databases.
 2)  Run the below command

       ALTER DATABASE DatabaseName
       SET PARTNER SUSPEND.

After this you could see that database status changed to DISCONNECT.
3) Next again run the below two commands.

ALTER DATABASE DatabaseName
SET PARTNER RESUME
After you ran the above statement you can see database come to PRINCIPAL\SYNCHRONIZED state.
4) Next run below command to do the failover

ALTER DATABASE DatabaseName
SET PARTNER FAILOVER






Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server