Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

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

RMAN Commands , 43 of 60


REPLACE SCRIPT

Syntax


Text description of replaces.gif follows
Text description of the illustration replaces.gif

backupCommands::=


Text description of backupco.gif follows
Text description of the illustration backupco.gif

restoreCommands::=


Text description of restorec.gif follows
Text description of the illustration restorec.gif

maintenanceCommands::=


Text description of maintena.gif follows
Text description of the illustration maintena.gif

miscellaneousCommands::=


Text description of miscella.gif follows
Text description of the illustration miscella.gif

Purpose

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:

  • 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 "CREATE SCRIPT"

  • For information about the EXECUTE SCRIPT command, see "EXECUTE SCRIPT"

Restrictions and Usage Notes

Keywords and Parameters

For descriptions of the individual commands that you can use in a stored script, refer to the appropriate entry, for example, "BACKUP".

REPLACE SCRIPT 'script_name' 

Replaces the specified stored script with the new commands. The statements allowable within the parentheses of the REPLACE SCRIPT 'script_name' ( ... ) 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:

SQL> 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 

Example

Replacing an RMAN Script: Example

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; }

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

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback