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

Part Number B14194-03
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
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

SPOOL

Syntax

spool::=

Description of spool.gif follows
Description of the illustration spool.gif

Purpose

To write RMAN output to a log file.

If the file does not already exist, then RMAN creates it. If the file does exist, then RMAN overwrites the file by default. If you specify APPEND, RMAN will append its output to the end of the file.

If the specified file cannot be opened for writing. Instead, RMAN turns SPOOL to OFF and continues execution.

See Also:

"cmdLine" for a description of LOG files

Restrictions and Usage Notes

Execute the SPOOL command outside of a RUN block.

Keywords and Parameters

Syntax Element Description
OFF Turns off spooling.
TO filename Specifies the name of the log file to which RMAN directs its output. RMAN creates the file if it does not exist, or overwrites the file if it does exist.
APPEND Specifies that RMAN should append its output to the end of the existing log.

Examples

Spooling RMAN Output to a File: Example This example directs RMAN output to standard output for the backup of datafile 1, then directs output to a log file for the backup of datafile 2, then directs output to a different log file for the whole database backup:

BACKUP DATAFILE 1;
SPOOL LOG TO '/tmp/df2log.f';
BACKUP DATAFILE 2;
SPOOL LOG OFF;
SPOOL LOG TO '/tmp/dblog.f';
BACKUP DATABASE;
SPOOL LOG OFF;