688
Part V: Enterprise Data Management
■ (^) Like log shipping, database mirroring provides redundancy at the database
level and not at the entire SQL Server instance level, such as SQL Server failover
clustering.
■ Like log shipping, database mirroring applies changes that are captured only in the
transaction log or the initial full backup of the principal database. Any database
objects such as logins, jobs, maintenance plans, SSIS packages, and linked servers
that reside outside the mirrored database need to be manually created on the mir-
ror server.
■ (^) Unlike log shipping, database mirroring does not support having multiple copies
for the same principal database. This means you can have only one mirror database
for each principal database. If you want multiple copies of the principle database
mirrored, you need to set up the AlwaysOn feature to create multiple Secondary
Replicas.
■ The mirror database name needs to be the same as the principal database name.
■ (^) If the mirror database fails, the transaction log space on the principal database
cannot be reused even if you are taking transaction log backups. This means you
either need to have enough space for the transaction log to grow and bring back
the mirror database online before the log fi lls up the available disk space and
brings the principal database to a halt, or break the database mirroring.
■ Depending on the workload, your environment, and database mirroring confi gura-
tion, database mirroring may impact application performance. Also, it can place a
large demand on the network while the transaction log records are sent.
If these drawbacks are acceptable, database mirroring can be an excellent choice for high
database availability, disaster recovery and reporting. It is highly recommended to thor-
oughly test database mirroring with your application and hardware and validate your
service-level agreements (SLAs) before implementing it in production.
Defi ning and Confi guring 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, mak-
ing 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 princi-
pal 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.
c27.indd 688c27.indd 688 7/31/2012 9:50:24 AM7/31/2012 9:50:24 AM
http://www.it-ebooks.info