RMAN Output to file
Many situations we may want to save the RMAN output to file . There are multiple ways to do this task
- By using RMAN Log command
- By using RMAN spool log command
In this document we will discuss about RMAN ‘Spool Log ‘ command
Using The Spool Command
Use the ‘spool log’ command to direct RMAN output to a file . Here are the steps to follow:
- Make sure the directory on which the log to be created has the read, write permission for Oracle instance owner
- Execute the following steps in the order to direct RMAN output to a file
RMAN> spool log to '/tmp/backup.log'; RMAN> backup datafile 1; RMAN> spool log off;
RMAN will create a log file ‘backup.log’ incase if the file doesnot exist. If such file exists it will overwrite the contents of the file.
You can use append command to avoid over writing the content.
spool log to '/tmp/rman/backup.log' append
The spool command will add the new contents to the end of the log file named backup.log