Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01





Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 33 of 50




To replace an existing script stored in the recovery catalog. If the script does not exist, 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 (see "run") to run it.

See Also:

  • For descriptions of the individual commands that you can use in a stored script, see the appropriate entry, for example, "backup".

  • For information about the @ and @@ arguments, see "createScript".

  • For information about the execute script command, see "run".



Keywords and Parameters

replace script script_name 

replaces the specified stored script with the new commands. The statements allowable within the parentheses of the replace script 'filename' ( ... ) command are the same allowable within the run command.

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:

select * from rc_stored_script;

Note: To run the script, issue execute script within the braces of the run command.

See Also: "RC_STORED_SCRIPT" for more information about RC_STORED_SCRIPT. 


Replacing a Script

This example creates a script called backup_full, replaces it with a different script, and then executes it:

create script backup_full {
   allocate channel ch1 type 'SBT_TAPE';
   allocate channel ch2 type 'SBT_TAPE';
   allocate channel ch3 type 'SBT_TAPE';
   backup database;
replace script backup_full {
   allocate channel ch1 type disk;
   backup database;
run { execute script backup_full; }

Related Topics





Go to previous page Go to beginning of chapter Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.