Skip Headers

Oracle® Database Recovery Manager Reference
10g Release 1 (10.1)

Part Number B10770-02
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page

Go to previous page
Go to current chapter
Go to next page
View PDF




Text description of replaceScript.gif follows

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".

Restrictions and Usage Notes

Keywords and Parameters

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 script_name defined on the current target database. If one is found, RMAN updates the local script with the new script contents. If no local script is found, RMAN looks for a global stored script script_name. If a global script script_name is found, RMAN updates it with the new script contents.


Identifies the local or global script being replaced.

COMMENT ='comment'

An explanatory comment, used in the output of LIST SCRIPT NAMES..

FROM FILE 'filename'

The new contents of the script are to be read from this file. The first line of the file must begin with a "{", the last line must contain a "}" and the commands must be valid within a RUN block.

{ backupCommands

| maintenanceCommands

| miscellaneousCommands

| restoreCommands


Commands valid in a stored script. These are the same commands supported within a RUN block. See "RUN" for more details about backupCommands, restoreCommands, maintenanceCommands, and miscellaneousCommands.


Replacing a Recovery Catalog Script: Example

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

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.