Wednesday, 7 September 2011

Database Mirror Recovery

If the primary database is still accessible then switch over to the secondary can be achieved by running the following code on the primary server for each of the failed databases.
ALTER DATABASE db_name SET PARTNER FAILOVER

If the primary database is not accessible then the secondary database can be forced on-line by removing the mirror and running the restore command for each of the failed databases.

ALTER DATABASE db_name SET PARTNER OFF RESTORE DATABASE db_name WITH RECOVERY

No comments:

Post a Comment