disk unmirror

Description

Suspends disk mirroring initiated with the disk mirror command to allow hardware maintenance or the changing of a hardware device.

Syntax

disk unmirror 
	name = "device_name" 
	[, side = {"primary" | secondary}] 
	[, mode = {retain | remove}] 

Parameters

name

is the name of the database device to unmirror. The name must be enclosed in single or double quotes.

side

specifies whether to disable the primary device or the secondary device (the mirror). By default, the secondary device is unmirrored.

mode

determines whether the unmirroring is temporary (retain) or permanent (remove). By default, unmirroring is temporary.

Specify retain when you plan to remirror the database device later in the same configuration. This option mimics what happens when the primary device fails:

  • I/O is directed only at the device not being unmirrored.

  • The status column of sysdevices indicates that mirroring is deactivated. remove eliminates all sysdevices references to a mirror device.

  • The status column indicates that the mirroring feature is ignored.

  • The phyname column is replaced by the name of the secondary device in the mirrorname column if the primary device is the one being deactivated.

  • The mirrorname column is set to NULL.

Examples

Example 1

Suspends software mirroring for the database device user_disk:

disk unmirror 
name = "user_disk"

Example 2

Suspends software mirroring for the database device user_disk on the secondary side:

disk unmirror name = "user_disk", side = secondary

Example 3

Suspends software mirroring for the database device user_disk and removes all device references to the mirror device:

disk unmirror name = "user_disk", mode = remove

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

disk unmirror permission defaults to the system administrator, and is not transferable. You must be using the master database to use disk unmirror.

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

24

disk

disk unmirror

  • Roles – current active roles

  • Keywords or optionsdisk unmirror

  • Previous value – NULL

  • Current value – NULL

  • Other information – name of the disk

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

See also

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

System procedures sp_diskdefault, sp_helpdevice, sp_logdevice

Utilities dataserver, startserver