686
Part V: Enterprise Data Management
Database mirroring has a log compression feature that is available in SQL Server 2012 Enterprise, Developer,
Business Intelligence and Standard Editions. It is on by default, and there is no special confi guration or switches to
turn it on. However, if the extra CPU usage due to log compression is not desirable in your environment, you can turn
off log compression by turning on the trace fl ag 1462.
The automatic page repair feature is not available in SQL Server 2012 Standard or Business Intelligence editions and
is available only in SQL Server 2012 Enterprise and Developer Editions.
Database Mirroring Overview
Database mirroring was fi rst offi cially supported with SQL Server 2005 SP1. Database mirror-
ing is available in Enterprise and Developer Editions and with some restrictions in Standard
and Business Intelligence Editions. Developer Edition can be used only for development
purposes and not for production.
The basic concept of database mirroring is simple. Database mirroring maintains a hot
standby database (mirror database) kept in sync with the production database (principal
database) by transferring transaction log records from the principal database to a mirror
database over the network, either synchronously or asynchronously. In case of a failure,
the mirror database can be quickly accessed by the clients. Database mirroring has the fol-
lowing benefi ts:
■ (^) It increases database protection by maintaining a mirror copy of your database.
■ It enables you to choose only the databases that you want to mirror from one
SQL Server instance to another. There is a 1:1 ratio from the principal to mirror
SQL Server. Multiple databases in a SQL Server instance can be mirrored together
using AlwaysOn Availability Groups, which are covered later in the section “High
Availability/AlwaysOn.”
■ (^) By default, it compresses and encrypts the data between the principal and mirror
server.
■ (^) It improves the availability of your databases during hardware or software
upgrades.
■ (^) It can be used for high database availability and disaster recovery purposes. To
achieve high database availability, place the principal and mirror SQL Servers in
the same data center. For disaster recovery, place the principal and mirror SQL
Servers in different data centers so that a disaster in one data center does not
affect the other data center.
■ It offers automatic page repair. If a page is marked as suspect due to corruption,
SQL Server automatically attempts to recover the page from a database mirroring
partner (principal or mirror) or an availability replica (primary or secondary).
c27.indd 686c27.indd 686 7/31/2012 9:50:23 AM7/31/2012 9:50:23 AM
http://www.it-ebooks.info