SQL Server Developer Center >
SQL Server Forums
>
Database Mirroring
>
Switching Back principal and mirror after failover
Switching Back principal and mirror after failover
- hi,I've setup a database mirroring with a principal, mirror and a witness.When the principal loses connection, the mirror successfully becomes available, as it should be.When the principal restores the connection, it becomes the mirror.What I would like to happen is that when the original principal comes back online, it will become available and a principal and the mirror (which was the principal while the original one was offline) will become the mirror again.Is that possible ?Thanks.
Dror Yitzhakov.
Answers
- Only if the principal server (which was earlier a mirror server) goes down, than it will again changed back. This is the feature of mirroring with witness.
Sudeepta Kumar Ganguly. sudeeptamcsa@gmail.com- Marked As Answer byYitzhakov Sunday, August 02, 2009 7:27 AM
- Proposed As Answer bySudeepta Ganguly Tuesday, July 28, 2009 12:18 PM
You can do it by monitoring the state of the original principal from the original mirror. Setup an alert to watch for the mirror (old principal) to be up and when it fires issue the command to failover. I don't have the background on why you would want to do this, but I don't see why you couldn't do it.
-Mike- Marked As Answer byYitzhakov Sunday, August 02, 2009 7:27 AM
All Replies
- Only if the principal server (which was earlier a mirror server) goes down, than it will again changed back. This is the feature of mirroring with witness.
Sudeepta Kumar Ganguly. sudeeptamcsa@gmail.com- Marked As Answer byYitzhakov Sunday, August 02, 2009 7:27 AM
- Proposed As Answer bySudeepta Ganguly Tuesday, July 28, 2009 12:18 PM
- Isn't there a way to do what I want to do?
Dror Yitzhakov. You can do it by monitoring the state of the original principal from the original mirror. Setup an alert to watch for the mirror (old principal) to be up and when it fires issue the command to failover. I don't have the background on why you would want to do this, but I don't see why you couldn't do it.
-Mike- Marked As Answer byYitzhakov Sunday, August 02, 2009 7:27 AM
- Or you can manually fail it back yourself from SSMS. Once the original principal is back online and insync with the new principal (old mirror), SQL Server will let you fail back. there's a button in database properties that allows you to failover to get your environment back to the original configuration.
HTH
Roz


