Mirroring a Database Device

SQL Server mirroring is used to ensure full recovery and continued operation in the event of media failure. Mirroring a device continuously duplicates the information from one SQL Server device to another. All transactions completed on a mirrored device are copied to its duplicate device. In the event that one device fails, the other contains an up-to-date copy of all transactions.

SQL Server mirroring can be set up at the same time a device is created or edited. Once mirroring has been set up, you can edit the device and mirror, unmirror, or remirror an existing device, or switch to a mirror device.

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 Advanced 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.

For information on setting up mirroring, and about using hardware- or software-based RAID, see Chapter 7, Managing Drives.