Recovery Catalog   «Prev 

Oracle Run Command Examples

Types of Recovery Manager Commands

RMAN uses two basic types of commands:
  1. stand-alone commands and
  2. job commands.
With the exception of the change, crosscheck, and delete commands, stand-alone commands are self-contained. In contrast, job commands must appear within the brackets of a run command. After you connect to the target and optional recovery catalog, you will execute most of your RMAN commands within run. Following is a typical example of a run statement:
run {
allocate channel c1 type 'sbt_tape';
restore database;
recover database;

Stand-Alone Commands

Unlike job commands, stand-alone commands do not appear as sub-commands within run. Following are some of the commands that can appear by themselves: catalog
  1. change
  2. create catalog, drop catalog, upgrade catalog
  3. create script, delete script, replace script
  4. crosscheck
  5. delete expired backupset
  6. list
  7. report

Some of these commands are not strictly stand-alone, however, because they must be preceded by an allocate channel for maintenance command.
To compile and execute job commands, which are one or more statements executed within the braces of run. The run command compiles the list of job commands into one or more job steps and then executes them immediately. RMAN compiles and executes each command before processing the next one.
  1. Execute this command only at the RMAN prompt.
  2. You must precede and follow the list of job commands with an opening and closing brace
Keywords and Parameters
Refer to individual entries for information about commands that you can run from the RMAN prompt.

Example of running the stored script that you used in the previous lesson. You can see the channel being allocated and the indication that the backup file has been created.

Here you can see the running of an operating system command as illustrated in a simple directory listing.

Executing a SQL command is illustrated here

Illustrated here is an example of an error condition by trying to run a show sga as a SQL command.