Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-02 |
|
|
View PDF |
replaceScript::=
Text description of replaceScript
To replace an existing script stored in the recovery catalog. If the script does not exist, then REPLACE
SCRIPT
creates it.
A stored script is a sequence of RMAN commands, given a name and stored in the recovery catalog for later execution. A stored script may be local (that is, associated with one target database) or global (available for use with any database registered in the recovery catalog).
For more information about stored scripts and commands used to create, update, delete and execute stored scripts, see "CREATE SCRIPT".
REPLACE
SCRIPT
only at the RMAN prompt.REPLACE SCRIPT
, RMAN must be connected to a recovery catalog, and the catalog database must be open.@
and @@
commands do not work within REPLACE
SCRIPT
.Syntax Element | Description |
---|---|
|
Restricts RMAN to replacing or creating a global stored script, instead of a local one. If omitted, RMAN looks for a local stored script |
|
Identifies the local or global script being replaced. |
|
An explanatory comment, used in the output of LIST SCRIPT NAMES.. |
|
The new contents of the script are to be read from this file. The first line of the file must begin with a " |
} |
Commands valid in a stored script. These are the same commands supported within a |
This example updates a stored script called backup_full
:
REPLACE SCRIPT backup_full COMMENT 'Run this to back up the database' { # uses configured channel for default device type BACKUP DATABASE; }
If there is a local script backup_full
, it is updated. If there is no local script backup_full
but there is a global script backup_full
, the global script is updated.