Creating a Shadow
Go Up to Shadowing
A shadow is created with the
CREATE SHADOW statement in SQL. Because this does not require exclusive access, it can be done without affecting users. For detailed information about
CREATE SHADOW, see the Language Reference.
Before creating a shadow, consider the following topics:
- The location of the shadow
- A shadow should be created on a different disk from where the main database resides. Because shadowing is intended as a recovery mechanism in case of disk failure, maintaining a database and its shadow on the same disk defeats the purpose of shadowing.
- Distributing the shadow
- A shadow can be created as a single disk file called a shadow file or as multiple files called a shadow set. To improve space allocation and disk I/O, each file in a shadow set can be placed on a different disk.
- User access to the database
- If a shadow becomes unavailable, InterBase can either deny user access to the database until shadowing is resumed, or allow access even though database changes are not being shadowed. Depending on which database behavior is desired, the database administrator creates a shadow either in auto mode or in manual mode. For more information about these modes, see Auto Mode and Manual Mode.
- Automatic shadow creation
- To ensure that a new shadow is automatically created, create a conditional shadow. For more information, see Conditional Shadows, in this chapter.
The next sections describe how to create shadows with various options:
- Single-file or multifile shadows
- Auto or manual shadows
- Conditional shadows
These choices are not mutually exclusive. For example, you can create a single-file, conditional shadow in manual mode.