Using SQL Server Mirroring

SQL Server mirroring can ensure full recovery and continued operation in the event of media failure. SQL Server mirroring continuously duplicates information from one SQL Server device to another. All transactions to the device are copied to its duplicate mirror device. If one of the devices fails, the other contains an up-to-date copy of all transactions. When a read or write to a mirrored device is unsuccessful, it causes the bad device to become unmirrored, and the remaining device takes over.

Note SQL Server mirroring is one way you can mirror a disk for recoverability, but disk mirroring can also be accomplished with the Windows NT Server software. You can also take advantage of hardware disk arrays that support various RAID levels. In most cases, the use of hardware-based RAID or Windows NT software-based RAID is recommended over SQL Server mirroring.

The following illustration shows how devices are continuously mirrored. As information is added or changed in DEVICE1, it is automatically reflected on the mirrored device. In this example, Chris James is added to the authors table, and then the addition is immediately reflected on the mirrored device.

For more information choose one of the following topics

Deciding What to Mirror

Mirroring

Unmirroring

Remirroring

Using the Master Database from a Mirror

Setting Up Mirroring using Transact-SQL Statements

Maintaining System Security in Case of Disk Failure