Oracle9i Recovery Manager Reference Release 1 (9.0.1) Part Number A90136-02 |
|
RMAN Commands , 43 of 60
backupCommands::=
restoreCommands::=
maintenanceCommands::=
miscellaneousCommands::=
To replace an existing script stored in the recovery catalog. If the script does not exist, then REPLACE
SCRIPT
creates it.
The stored script feature is provided primarily to provide a common repository for frequently executed collections of RMAN commands: use any command legal within a RUN
command in the script. The script is not executed immediately; use the
EXECUTE SCRIPT
command to run it.
See Also:
|
REPLACE
SCRIPT
only at the RMAN prompt.
@
and
@@
commands do not work within REPLACE
SCRIPT
.
For descriptions of the individual commands that you can use in a stored script, refer to the appropriate entry, for example, "BACKUP".
|
Replaces the specified stored script with the new commands. The statements allowable within the parentheses of the To obtain a listing of all stored scripts, use SQL*Plus to connect to the recovery catalog database as the catalog owner and issue the following query: SQL> SELECT * FROM RC_STORED_SCRIPT;
Note: To run the script, issue
See Also: "RC_STORED_SCRIPT" for more information about |
This example creates a script called backup_full
, replaces it with a different script, and then executes it:
CREATE SCRIPT backup_full { # manually allocates disk channels, specifying 3 different directories ALLOCATE CHANNEL ch1 DEVICE TYPE DISK FORMAT '/disk1/%U'; ALLOCATE CHANNEL ch2 DEVICE TYPE DISK FORMAT '/disk2/%U'; ALLOCATE CHANNEL ch3 DEVICE TYPE DISK FORMAT '/disk3/%U'; BACKUP DATABASE; } REPLACE SCRIPT backup_full { # uses configured channel for default device type BACKUP DATABASE; } RUN { EXECUTE SCRIPT backup_full; }
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|