disk unmirror

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

Examples

Usage

  • Disk mirroring creates a software mirror of a user database device, the master database device, or a database device used for user database transaction logs. If a database device fails, its mirror immediately takes over.

    disk unmirror disables either the original database device or the mirror, either permanently or temporarily, so that the device is no longer available to the SAP ASE server for reads or writes. It does not remove the associated file from the operating system.

  • Disk unmirroring alters the sysdevices table in the master database. Back up the master database with the dump database command after each use of disk unmirror. This makes recovery easier and safer in case master is damaged.

  • You can unmirror a database device while it is in use.

  • You cannot unmirror any of a database’s devices while a dump database, load database, or load transaction is in progress. The SAP ASE server displays a message asking whether to abort the dump or load or to defer the disk unmirror until after the dump or load completes.

  • You cannot unmirror a database’s log device while a dump transaction is in progress. The SAP ASE server displays a message asking whether to abort the dump or defer the disk unmirror until after the dump completes.

    Note: dump transaction with truncate_only and dump transaction with no_log are not affected when a log device is unmirrored.
  • Mirror all the default database devices so that you are still protected if a create or alter database command affects a database device in the default list.

  • When a read or write to a mirrored device is unsuccessful, the SAP ASE server automatically unmirrors the bad device and prints error messages. The SAP ASE server continues to run, unmirrored. A system administrator must restart mirroring with the disk remirror command.

  • For a report on all SAP ASE devices on your system (user database devices and their mirrors, as well as dump devices), execute sp_helpdevice.

  • Use disk remirror to reestablish mirroring after it is temporarily stopped with the mode = retain option of the disk unmirror command. If mirroring is permanently disabled with the mode = remove option, you must remove the operating system file that contains the mirror before using disk remirror.

See also:
  • sp_diskdefault, sp_helpdevice, sp_logdevice in Reference Manual: Procedures

  • dataserver, startserver in the Utility Guide

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

The permission checks for disk unmirror differ based on your granular permissions settings. You must be using the master database to use disk unmirror.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage disk privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role.

disk unmirror permission is not transferable.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

24

Audit option

disk

Command or access audited

disk unmirror

Information in extrainfo
  • 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

Related reference
dump database
load database
load transaction
dump transaction
disk unmirror
alter database
disk remirror
create database
disk init
disk mirror
disk refit
disk reinit