Auto Mode and Manual Mode (Using CREATE 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:
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.
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)
AUTO keyword directs the
CREATE SHADOW statement to create a shadow in
CREATE SHADOW 1 AUTO 'employee.shd';
Auto mode is the default, so omitting the
AUTO keyword achieves the same result.
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)
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.