Oracle8i Backup and Recovery Guide
Release 8.1.5

A67773-01

Library

Product

Contents

Index

Prev Prev Next


replaceScript

Syntax


Purpose

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.

Requirements

Keywords and Parameters

For descriptions of the individual commands that you can use in a stored script, see the appropriate entry, e.g., "backup". For information about the @ and @@ arguments, see "createScript". For information about the execute script command, see "run".

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: For more information about RC_STORED_SCRIPT, see "RC_STORED_SCRIPT".  

Examples

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

"createScript"

"deleteScript"

"printScript"

"run"




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index