SET SHADOW

Sets a list of databank shadows offline or online, with the option of clearing the LOGDB records for them.

set_shadow.png

 

Usage

Embedded, Interactive, Module, ODBC, JDBC.

Description

Setting a databank shadow OFFLINE suspends updating of it. A typical use for this is when taking databank backups from shadows using the host file system.

When a databank shadow is set ONLINE again, you must specify whether:

to clear the applicable LOGDB records using the RESET LOG option

or whether to preserve these (using the PRESERVE LOG option).

Use the RESET LOG option after a successful backup has been taken.

Clearing records from LOGDB is handled automatically when CREATE BACKUP is used to take databank backups.

Restrictions

The current ident must either be the creator of the databank to be shadowed, or have BACKUP privilege in order to use all the SET SHADOW options.

If the current ident holds SHADOW privilege, the shadow can be set offline and online with the PRESERVE LOG option, but the RESET LOG option cannot be used.

SET SHADOW cannot be used if the master databank is OFFLINE.

Notes

While a shadow is OFFLINE, updating of it is suspended. It is possible to use ALTER SHADOW to change the shadow while it is OFFLINE.

If ALTER SHADOW was used to change the location of the shadow file while the shadow was OFFLINE, the SET SHADOW statement will verify that the new file contains a valid copy of the shadow when the shadow is set ONLINE again (it cannot, however, check that the contents of the file is up-to-date).

It is possible to use DROP SHADOW to drop an OFFLINE shadow.

SET SHADOW OFFLINE will succeed with a warning if the shadow exists and is ONLINE, but the file cannot be accessed for some reason.

It is not possible to set more than a single shadow of any given databank OFFLINE at a time. If the shadow-list contains more than one shadow for a databank, none of the shadows for that databank will be set OFFLINE, and an error will be raised.

An error will be raised if an attempt is made to set a shadow OFFLINE that is already OFFLINE, or ONLINE when it is already ONLINE.

Example

SET SHADOW MIMER_STORE$SHADOW_1, MIMER_STORE$SHADOW_2 ONLINE RESET LOG;

 

For more information, see the System Management Manual, Mimer SQL Shadowing.

Standard Compliance

Standard

Compliance

Comments

 

Mimer SQL extension

The SET SHADOW statement is a Mimer SQL extension.