disk mirror

Description

Creates a software mirror that immediately takes over when the primary device fails.

Syntax

disk mirror 
	name = "device_name" , 
	mirror = "physicalname" 
	[, writes = { serial | noserial }]

Parameters

name

is the name of the database device that you want to mirror. This is recorded in the name column of the sysdevices table. The name must be enclosed in single or double quotes.

mirror

is the full path name of the database mirror device that is to be your secondary device. It must be enclosed in single or double quotes. If the secondary device is a file, physicalname should be a path specification that clearly identifies the file, which Adaptive Server creates. The value of physicalname cannot be an existing file.

writes

allows you to choose whether to enforce 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. If the primary and secondary devices are on different physical devices, serial writes can ensure that at least one of the disks will be unaffected in the event of a power failure.

Examples

Example 1

disk mirror 
	name = "user_disk", 
	mirror = "/server/data/mirror.dat"

Creates a software mirror for the database device user_disk on the file mirror.dat.

Usage

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

disk mirror permission defaults to the System Administrator and is not transferable. You must be using the master database to use disk mirror.

See also

Commands alter database, create database, disk init, disk refit, disk reinit, disk remirror, disk unmirror, dump database, dump transaction, load database, load transaction

System procedures sp_diskdefault, sp_helpdevice, sp_logdevice

Utilities dataserver, startserver