DISK MIRROR Statement

Note In the future, support for SQL Server device mirroring may be discontinued. It is recommended that you use either the mirroring functionality of the Microsoft Windows NT operating system, or hardware-based mirroring if your hardware supports it. For more information about Windows NT mirroring, see the Microsoft Windows NT operating system documentation in the What's New for SQL Server 6.5.

Creates a software image of the SQL Server device.

Syntax

DISK MIRROR
    NAME = 'logical_name',
    
MIRROR = 'physical_name'
    [, WRITES = {SERIAL | NOSERIAL}]

where

NAME
Is the logical name of the database device that you want to mirror.
MIRROR
Is the drive letter and full path of the database mirror image (file) that is to be your secondary device. The path must be enclosed with single quotation marks ('). The physical name of this device goes in the mirrorname column of the sysdevices table. A device and its mirror together constitute one logical device. It cannot be an existing file.
WRITES
Enforces serial writes to the devices. In the default case (SERIAL), the write to the primary database device is guaranteed to finish before the write to the secondary device begins. Assuming that the primary and secondary devices are on different physical devices, serial writes can ensure that at least one of the disks may be unaffected by a power failure. SQL Server always performs serial writes. The NOSERIAL parameter is retained for compatibility with SQL Server on other platforms.

Remarks

The system administrator must be using the master database to use the DISK MIRROR statement.

Permission

DISK MIRROR permission defaults to the system administrator and is not transferable.