Suspends disk mirroring initiated with the disk mirror command to allow hardware maintenance or the changing of a hardware device.
disk unmirror name = "device_name" [ ,side = { "primary" | secondary }] [ ,mode = { retain | remove }]
is the name of the database device that you want to unmirror. The name must be enclosed in single or double quotes.
specifies whether to disable the primary device or the secondary device (the mirror). By default, the secondary device is unmirrored.
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.
Suspends software mirroring for the database device user_disk:
disk unmirror name = "user_disk"
Suspends software mirroring for the database device user_disk on the secondary side:
disk unmirror name = "user_disk", side = secondary
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
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 Adaptive 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. It is important to 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. Adaptive 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. Adaptive Server displays a message asking whether to abort the dump or defer the disk unmirror until after the dump completes.
dump transaction with truncate_only and dump transaction with no_log are not affected when a log device is unmirrored.
You should 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, Adaptive Server automatically unmirrors the bad device and prints error messages. Adaptive Server continues to run, unmirrored. A System Administrator must restart mirroring with the disk remirror command.
For a report on all Adaptive Server 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.
SQL92 – Compliance level: Transact-SQL extension.
disk unmirror permission defaults to the System Administrator, and is not transferable. You must be using the master database to use disk unmirror.
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