Auto Mode and Manual Mode

From InterBase
Jump to: navigation, search

Go Up to Creating a Shadow


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 database administrator might be unaware that the database is operating without a shadow

Manual

Prevents the database from running unintentionally without a shadow

Database operation is halted until the problem is fixed

Needs intervention of the database administrator

Auto mode

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

SQL> 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 is uninterrupted even though there is no shadow. To resume shadowing, it might be necessary to create a new shadow. If the original shadow was created as a conditional shadow, a new shadow is automatically created. For more information about conditional shadows, see Conditional Shadows.

Manual mode

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

SQL> 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 attachments to the database are prevented. To allow database attachments again, the database owner or SYSDBA must enter the following command:

gfix -kill database

This command deletes metadata references to the unavailable shadow corresponding to <database>. After deleting the references, a new shadow can be created if shadowing needs to resume.

See Also