Fast failover with minimal data loss has traditionally
involved higher hardware cost and greater software complexity. Database
mirroring, however, can fail over quickly with no loss of committed data, does
not require proprietary hardware, and is easy to set up and manage.
Poor man's clustering solution, cost effective failover
solution, whatever you call it, Database Mirroring is one of the most talked
about features in SQL Server 2005.
In DB Mirroring, a SQL Server 2005 instance continuously
ships its transaction log records to a copy of the database on another SQL
Server instance. So you have the principal server and the mirror server. However,
the names are relative since the roles can be switched over in case of a
failover. These are considered as partners. We may also have a third server
called the witness server allowing for automatic failover. With the presence of
the witness server, a quorum is formed. If the principal server goes down, the
mirror server can take the role of the principal in a few seconds after getting
a confirmation from the witness server. Not to mention, in the absence of a witness
server the failover has to be performed manually either through SQL Server Management
Studio or T-Sql.