Auto Mode and Manual Mode (Using CREATE SHADOW)

From InterBase
Jump to: navigation, search

A shadow can become unavailable for the same reasons a database becomes unavailable: disk failure, network failure, or accidental deletion. If a shadow becomes unavailable, and it was created in AUTO mode, database operations continue automatically without shadowing. If a shadow becomes unavailable, and it was created in MANUAL mode, further access to the database is denied until the database administrator intervenes. The benefits of AUTO mode and MANUAL mode are compared in the following table:

Auto vs. manual shadows
Mode Advantage Disadvantage

AUTO

Database operation is uninterrupted

Creates a temporary period when the database is not shadowed; the DBA might be unaware that the database is operating without a shadow.

MANUAL

Prevents the database from running unintentionally without a shadow

Halts database operation until the problem is fixed; needs intervention of the DBA


Auto Mode (Using CREATE SHADOW)

The AUTO keyword directs the CREATE SHADOW statement to create a shadow in AUTO mode:

CREATE SHADOW 1 AUTO 'employee.shd';

Auto mode is the default, so omitting the AUTO keyword achieves the same result.

In AUTO mode, database operation continues even if the shadow becomes inoperable. If the original shadow was created as a conditional shadow, a new shadow is automatically created. If the shadow was not conditional, you must create a new shadow manually. For more information about conditional shadows, see Conditional Shadows.


Manual mode (Using CREATE SHADOW)

The MANUAL keyword directs the CREATE SHADOW statement to create a shadow in manual mode:

CREATE SHADOW 1 MANUAL 'employee.shd';

Manual mode is useful when continuous shadowing is more important than continuous operation of the database. When a manual-mode shadow becomes unavailable, further connections to the database are prevented. To allow database connections again, the database administrator must remove the old shadow file, delete references to it, and create a new shadow.