Skip Headers

Oracle9i Recovery Manager Reference
Release 2 (9.2)

Part Number A96565-01
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 , 20 of 59


CREATE SCRIPT

Syntax

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


See Also:

The syntax diagrams for "RUN" to determine which commands are included in the backupCommands, restoreCommands, maintenanceCommands, and miscellaneousCommands clauses

Purpose

To create a script and store it in the recovery catalog. Stored scripts provide a common repository for frequently executed collections of RMAN commands. Any command that is legal within a RUN command is permitted in the stored script. The script is not executed immediately; run the script with EXECUTE SCRIPT.

See Also:

Oracle9i Recovery Manager User's Guide to learn how to store scripts in the recovery catalog

Restrictions and Usage Notes

Note the following restrictions:

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

Syntax Element Description

'script_name'

Creates a stored script with the specified name. The statements allowable within the brackets of the CREATE SCRIPT 'script_name' { ... } command are the same allowable within the RUN command. The statements within the braces constitute the job_command_list.

Note: To run the stored script, specify EXECUTE SCRIPT within the braces of the RUN command.

Example

Creating a Script: Example

The following UNIX shell script creates a recovery catalog script called b_whole_10 that backs up the database and archived redo logs, then executes b_whole_10:

#!/usr/bin/tcsh
rman TARGET / CATALOG rman/rman@catdb <<EOF
# creates recovery catalog script to back up database and archived logs
CREATE SCRIPT b_whole_l0 
{
    BACKUP INCREMENTAL LEVEL 0 TAG b_whole_l0 
    DATABASE PLUS ARCHIVELOG;
}
# runs the recovery catalog script b_whole_10
RUN { EXECUTE SCRIPT b_whole_10; }
EOF

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 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