Skip Headers
Oracle® Database Backup and Recovery Reference
10g Release 2 (10.2)

Part Number B14194-02
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 next page
Next
View PDF

RUN

Syntax

run::=

Description of run.gif follows
Description of the illustration run.gif

backupCommands::=

Description of backupcommands.gif follows
Description of the illustration backupcommands.gif

restoreCommands::=

Description of restorecommands.gif follows
Description of the illustration restorecommands.gif

maintenanceCommands::=

Description of maintenancecommands.gif follows
Description of the illustration maintenancecommands.gif

miscellaneousCommands::=

Description of miscellaneouscommands.gif follows
Description of the illustration miscellaneouscommands.gif

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