Team Fly |
$ rman RMAN> connect catalog rmancat/rmancat@sid RMAN> connect target sys/pwd@sid RMAN> register database;
You are now ready to start using RMAN, but before going too far, let's take a quick tour of some RMAN features.
A stored script is a set of RMAN commands that are stored in the recovery catalog. These can be used to perform tasks such as backup restore, recovery, or reporting. This option allows you to develop, test, and save commands, as well as minimize the potential for operator errors. Each script relates to one target database only. The following is a sample stored script that allocates a channel and performs an incremental level 0 full database backup. The current log is archived and all archive logs are then backed up and deleted.
RMAN> create script b_whole_10 { allocate channel c1 type disk; backup incremental level 0 format /u01/backup/b_t%t_s%s_p%p' (database); sql 'ALTER SYSTEM ARCHIVE LOG CURRENT'; backup (archivelog all delete input); }
As shown in the preceding script, RMAN can back up archive logs to tape and then delete the online versions once they have been successfully backed up. This is a great space saver!
Oracle multiplexes datafile blocks from different data files into the same backup set to control backup and overall system performance. In Oracle Database 10g, this is set by the lesser of the number of files in each backup set and the default number of files that RMAN reads in a single channel (which is eight). There are three performance benefits of multiplexed backups:
1. Keeps a high-performance sequential output device streaming by including a sufficient number of datafiles in the backup.
2. Prevents saturating a single datafile with too many read requests.
3. The read rate can be limited with the set limit channel command.
Team Fly |