disk mirror


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


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



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.


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.


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.


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.



SQL92 – Compliance level: Transact-SQL extension.


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