Thursday, August 18, 2011

Manually Fail Over a Database Mirroring Session

Manually Fail Over a Database Mirroring Session. 
Here is the script for manually doing fail over in Database Mirroring.

ALTER DATABASE AdventureWorks SET PARTNER FAILOVER 

Change Mirrored database to Principal in High Safety Mode
Here is the script to be run on the mirror server for changing mirrored database to Principal. 

ALTER DATABASE Database_Name SET PARTNER FORCE_SERVICE_ALLOW_DATA_LO
RESTORE DATABASE Database_Name WITH RECOVERY 

Change Mirrored database to Principal in High Performance Mode
Here is the script to be run on the mirror server for changing mirrored database to Principal.

ALTER DATABASE Database_Name SET PARTNER OFF
RESTORE DATABASE Database_Name WITH RECOVERY

Database Mirroring in SQL Server 2005, Database Mirroring in SQL Server 2008, Database Mirroring in SQL Server 2012, How to failover Database Mirroring, Database Mirroring Automating Failover, Database Mirroring manual Failover, Database Mirroring Failover Considerations, how to failover from the mirror database to prinicipal database, In Recovery, how to bring back database from In Recovery, Manually Fail Over a Database Mirroring Session, Database Mirroring in SQL Server, Mirroring Failover if Primary Database Server , Manually Fail Over a Database Mirroring Session, Database Mirroring Witness

3 comments:

If i will use mirroring i can use system recovery model simple?

no; nor can you use bulk logged recovery mode.

Post a Comment