Skip Headers

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

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

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

RUN

Syntax

run::=

Text description of run.gif follows


Text description of run

backupCommands::=

Text description of backupCommands.gif follows


Text description of backupCommands

restoreCommands::=

Text description of restoreCommands.gif follows


Text description of restoreCommands

maintenanceCommands::=

Text description of maintenanceCommands.gif follows


Text description of maintenanceCommands

miscellaneousCommands::=

Text description of miscellaneousCommands.gif follows


Text description of miscellaneousCommands

Purpose

The RUN command lets you group a series RMAN commands into a block to be executed sequentially. It also creates a scope within which a script can override default configured channels for a task using the ALLOCATE CHANNEL and RELEASE CHANNEL commands, and other parameters using the SET command with appropriate arguments. On completing the execution of the commands listed in the RUN block, the channels allocated within the RUN block are released and settings returned to their values.

Upon reading the closing brace of the RUN block, RMAN compiles the list of job commands into one or more job steps and then executes the steps immediately.

Restrictions and Usage Notes

Keywords and Parameters

Refer to individual entries for information about commands that you can run from the RMAN prompt.

Examples

Making a Backup: Example

This example backs up a database by using a single manually allocated channel to perform the backup:

RUN
{
  ALLOCATE CHANNEL c1 TYPE sbt;
  BACKUP DATABASE;
}
Restoring and Recovering a Tablespace: Example

This example takes tablespace tools offline, restores it, then performs complete media recovery:

RUN
{  
  SQL "ALTER TABLESPACE tools OFFLINE IMMEDIATE"; 
  RESTORE TABLESPACE tools; 
  RECOVER TABLESPACE tools;  
  SQL "ALTER TABLESPACE tools ONLINE"; 
} 
Executing an RMAN Script: Example

This example executes the stored script backup_db:

RUN { EXECUTE SCRIPT backup_db; }