If you are using only two SQL servers, you need to fail manually. The backup database will be used after two actions:
- Disable mirroring on it
- Restore the database using RECOVERY (but without a backup file this will make the database usable).
Therefore, mirroring in this way makes scense , however, it is difficult to maintain;
Returning from the backup database to the main one is a pain, because you need to configure full mirroring again with the backup of the redundant server. This is necessary to get the basic backup up to speed.
My recommendation would be to get a brief SQL Server in the picture, which can act as a witness. The witness will monitor the status of the mirroring databases. Your bonus; You will receive an automatic transfer to another resource and will not have a problem with the failure (and after the failure).
If I remember correctly, the witness server can run SQL Express, so there is no need for an Enterprise version for all three β only those where the actual mirroring will take place.
Let me know if you need Transact SQL for the fail-over and anti-fail-over commands in a two-server scenario, and I can dig them out.
Thies source share