Databases Reference
In-Depth Information
From the RMAN Command Line
You can also spool the output to a log file from the RMAN command line, as shown here:
RMAN> spool log to rman_output.log
RMAN> set echo on
RMAN> backup database;
To turn off logging, use the log off parameter, as shown here:
RMAN> spool log off;
You should now have captured in your log file all the output associated with the backup database command.
We recommend that when you capture the output to a log file that you also use the set echo on command. This
will ensure that the rMan command is displayed before actually running it.
Tip
USING the UNIX SCrIpt COMMaND
if you're in a linux/unix environment, you can use the script command to record everything printed to your
screen. For example, if you wanted to capture all output from an rMan session in a file named rman.log, then use
the linux/unix script command as shown here:
$ script rman.log
Script started, file is rman.log
$ rman target /
RMAN> backup database;
You should see several rMan output messages at this time:
RMAN> exit
now press Ctrl+D (or type exit ) to end the script session. after you press Ctrl+D (or type exit) , you should see
this message:
$ Script done, file is rman.log
You should now see all the output from your backup database command in the rman.log file.
How It Works
You can use the RMAN command-line log option or the spool command to capture output in a log file. When you
are troubleshooting RMAN, it's often helpful to capture all the output in a log file so that it can be analyzed later.
If you request assistance from Oracle Support, often they will ask you to capture the complete RMAN session output
and send it to them.
 
 
Search WWH ::




Custom Search