disk remirror

Restarts disk mirroring after it is stopped by failure of a mirrored device, or temporarily disabled by the disk unmirror command.

Syntax

disk remirror 
	name = "device_name"

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.

    Use the disk remirror command to reestablish mirroring after it has been temporarily stopped by failure of a mirrored device, or temporarily disabled with the mode = retain option of the disk unmirror command. The disk remirror command copies data on the retained disk to the mirror.

  • Back up the master database with the dump database command after each use of disk remirror. This makes recovery easier and safer in case master is damaged.

  • If mirroring was permanently disabled with the mode = remove option, you must remove the operating system file that contains the mirror before using disk remirror.

  • Database devices, not databases, are mirrored.

  • You can mirror, remirror, or unmirror database devices without shutting down the SAP ASE server. Disk mirroring does not interfere with ongoing activities in the database.

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

  • In addition to mirroring user database devices, always put user database transaction logs on a separate database device. The database device used for transaction logs can also be mirrored for even greater protection. To put a database’s transaction log (that is, the system table syslogs) on a different device than the one on which the rest of the database is stored, name the database device and the log device when you create the database. Alternatively, use alter database to point to a second device, then run sp_logdevice.

  • If you mirror the database device for the master database, you can use the -r option and the name of the mirror for UNIX, when you restart the SAP ASE server with the dataserver utility program. Add this option to the RUN_servername file for that server so that the startserver utility program knows about it. For example, the following command starts a master device named master.dat and its mirror, mirror.dat:
    dataserver -dmaster.dat -rmirror.dat

    See dataserver and startserver in the Utility Guide.

  • 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.

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 remirror differ based on your granular permissions settings. You must be using the master database to use disk remirror.

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 remirror permission is not transferable.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

25

Audit option

disk

Command or access audited

disk remirror

Information in extrainfo
  • Roles – current active roles

  • Keywords or optionsdisk remirror

  • 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
alter database
create database
disk init
disk mirror
disk refit
disk reinit
disk unmirror
dump transaction
load database
load transaction