Database Reference
In-Depth Information
With SET ECHO ON , this output shows the actual command that was run:
backup datafile 4;
Starting backup at...
From the prior output, you can see which command is running, when it started, and so on.
Showing Variables
Another good practice is to run the SHOW ALL command within any script, as follows:
RMAN> show all;
This displays all the RMAN configurable variables. When troubleshooting, you may not be aware of something
that another DBA has configured. This gives you a snapshot of the settings as they were when the RMAN session
executed.
Running Backups
Before you run an RMAN backup, make sure you read Chapter 4 for details on how to configure RMAN with settings
for a production environment. For production databases, I mainly run RMAN from a shell script similar to the
one shown at the end of Chapter 4. Within the shell script, I configure every aspect of RMAN that I want to use for
a particular database. If you run RMAN out of the box, with its default settings, you will be able to back up your
database. However, these settings will not be adequate for most production database applications.
Backing Up the Entire Database
If you're not sure where RMAN will be backing up your database files, you need to read Chapter 4, because it describes
how to configure RMAN to create the backup files in the location of your choice. Here is how I usually configure
RMAN to write to specific locations on disk (note that the CONFIGURE command must be executed before you run the
BACKUP command):
RMAN> configure channel 1 device type disk format '/u01/O12C/rman/rman1_%U.bk';
After a backup location is configured, I almost always use a command similar to the one shown next to back up
the entire database:
RMAN> backup incremental level=0 database plus archivelog;
This command ensures that RMAN will back up all data files in the database, all available archive redo logs
generated prior to the backup, and all archive redo logs generated during the backup. This command also ensures that
you have all the data files and archive redo logs that would be required to restore and recover your database.
If you have the autobackup of the control file feature enabled, run this command next:
RMAN> configure controlfile autobackup on;
 
Search WWH ::




Custom Search