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 that you want 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:

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

SQL92 – 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.

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