Hi,
Database mirroring requires three servers, including the principal database, mirroring database, and witness database.
· Primary database: The primary database is a read/write database in database mirroring. It processes the transaction requests for reading and writing data from and to applications. The transaction log records are applied to the read-only copy (mirror database) of the database.
· Mirroring database: A copy of the primary database that is fully synchronized with the primary database and serves as a standby server. The data in the mirror database cannot be directly accessed. When the primary database is faulty, the data is automatically switched to the mirror database.
· Witness database: enables the mirror server to identify when to start automatic failover.
During the running of database mirroring, the system can still work properly even if any server is faulty. If any two servers are faulty, the system cannot work properly. Therefore, at least two servers must be running properly.