Who Can Create a Shadow
The CREATE SHADOW
statement can be executed by:
-
Users with the
ALTER DATABASE
privilege
The CREATE SHADOW
statement can be executed by:
Users with the ALTER DATABASE
privilege
CREATE SHADOW
Creating a shadow for the current database as “shadow number 1”:
CREATE SHADOW 1 'g:\data\test.shd';
Creating a multi-file shadow for the current database as “shadow number 2”:
CREATE SHADOW 2 'g:\data\test.sh1'
LENGTH 8000 PAGES
FILE 'g:\data\test.sh2';
DROP SHADOW
Drops (deletes) a shadow file from the current database
DSQL, ESQL
DROP SHADOW sh_num [{DELETE | PRESERVE} FILE]
Parameter | Description |
---|---|
sh_num |
Shadow number — a positive number identifying the shadow set |
The DROP SHADOW
statement deletes the specified shadow for the current database.When a shadow is dropped, all files related to it are deleted and shadowing to the specified sh_num ceases.The optional DELETE FILE
clause makes this behaviour explicit.On the contrary, the PRESERVE FILE
clause will remove the shadow from the database, but the file itself will not be deleted.
The DROP SHADOW
statement can be executed by:
Users with the ALTER DATABASE
privilege
DROP SHADOW
DROP SHADOW 1;