Defining and Configuring Database Mirroring

Although database mirroring appears to be similar to log shipping, it is different from log shipping. As explained in Chapter 26, “Log Shipping,” log shipping involves periodically restoring a transaction log backup from the primary server to a warm standby server, making that server ready to recover at a moment's notice. Database mirroring continuously transfers the transaction log records, and not the transaction log backups, from the principal database and applies it to the mirror database.

Database mirroring normally involves three SQL Servers: a principal server, a mirror server, and an optional witness server.

  • The principal server is the main production SQL Server to which clients connect. This server contains the database that you want to create as a duplicate, hot standby, or mirror copy. The initial full database backup is taken on this server.
  • The mirror server is the hot standby SQL Server. If the principal server fails, the mirror server becomes the new principal server. This server must meet the minimum performance requirements during a short-term crisis. If your business does not allow any performance degradation, the mirror server should be similar (same CPU and memory configuration) to the principal server.
  • The principal server and mirror server are often referred to as partners in a database mirroring session.
  • The witness server is an optional separate SQL Server and is required only when automatic failover is required. ...

Get Microsoft SQL Server 2012 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.