Using RMAN Commands
The main purpose of Recovery Manager is to make it easy to perform backup and recovery operations. With Oracle9i Recovery Manager, the command needed to do a full online backup of your database is quite simple. The following examples assume that you have already connected to the target database and that you are using defaults for all options.
RMAN>BACKUP DATABASE FORMAT2>'/d99/rmanback/brdstn/rman_%d_%t_%U.bus';
Oracle8i RMAN required you to issue the RUN command and explicitly allocate a channel. To perform the same backup shown previously, you would need the following, more complex set of commands with Oracle8i:
RMAN>RUN {2>ALLOCATE CHANNEL d1 TYPE DISK;3>BACKUP DATABASE FORMAT4>'/d99/rmanback/brdstn/rman_%d_%t_%U.bus';5>}
To perform a normal recovery operation with Oracle9i RMAN, use the following commands, assuming that the database is already closed:
RMAN>RESTORE DATABASE;RMAN>RECOVER DATABASE;RMAN>ALTER DATABASE OPEN;
The same basic recovery operation with RMAN in Oracle8i requires the following commands:
RMAN>RUN{2>ALLOCATE CHANNEL d1 TYPE DISK;3>RESTORE DATABASE;4>RECOVER DATABASE;5>ALTER DATABASE OPEN; }
RMAN provides a lot of flexibility for shaping the way you perform backup and recovery operations, as the commands in the remainder of this chapter will show.