disk init  disk refit

Chapter 1: Commands

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 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 is 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

ANSI SQL – 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.

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

23

disk

disk mirror

  • Roles – Current active roles

  • Keywords or optionsdisk mirror

  • Previous value – NULL

  • Current value – NULL

  • Other information – Name of the disk

  • Proxy information – Original login name, if set proxy in effect

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





Copyright © 2005. Sybase Inc. All rights reserved. disk refit

View this book as PDF