Lesson 4 | Preparation for using RMAN |
Objective | Discuss the preparation involved in using RMAN. |
Preparation for using RMAN
How to prepare to use RMAN
As every database administrator knows, backing up a database is a boring but necessary task.
An improper backup makes recovery difficult, if not impossible. Unfortunately, people often realize the extreme importance of this everyday task only after losing business-critical data resulting from a failure of a related system.
Typical kinds of backups include
- complete database backups,
- tablespace backups,
- datafile backups,
- control file backups, and
- archivelog backups.
Oracle's Recovery Manager (RMAN) enables server-managed backup and recovery of the database and leverages a
Recovery Catalog stored in the database. RMAN can automatically locate, back up, restore, and recover datafiles, control files, and archived redo logs. During backups, RMAN verifies all data blocks to ensure that corrupt blocks are not propagated to backup
files. Efficient recovery can occur at the individual block level.
RMAN can restart backups and restore and implement recovery window policies when backups expire. A variety of compression levels are supported to assure reasonable performance where network bottlenecks or CPU limitations exist. A Fast Recovery Area
(FRA) can be defined on a file system or ASM disk group enabling better space management.
Oracle Enterprise Manager provides a GUI-based interface to RMAN and includes a job scheduler that can be used with RMAN for managing automatic backups to disk.
RMAN can perform incremental backups of Enterprise Edition Databases.
Incremental backups will back up only the blocks modified since the last backup of a datafile, tablespace,
or database.
Hence, they are smaller and faster than complete backups. RMAN can also perform point-in-time recovery, which allows the recovery of
data until just prior to an undesirable event (such as the mistaken dropping of a table).
As with other Oracle tools, you have many options and decisions to make before you start to use Recovery Manager. Assuming that you decide to use Recovery Manager, your biggest decision is whether or not to have a recovery catalog. Every database environment is unique. As you start to manage multiple installations, your effort to support these sites becomes less manageable. One option to minimize your DBA work is to use RMAN with a recovery catalog.
Oracle Backup and Recovery
Recovery catalog
The first major decision that you need to make is whether or not to use the recovery catalog. There are some benefits to the recovery catalog, such as using it to store frequently used scripts and to maintain historical information about your backup activities. Specific RMAN features that require the recovery catalog include:
- Tablespace point-in-time recovery
- Stored scripts
- Restore and recovery when the control file is lost
Control Files
If you do not elect to use a recovery catalog, you must protect your production database control files. This should be done by using multiplexed control files and by keeping them on separate disks. You must also maintain excellent backup records that identify which files are backed up and where each piece is stored. Oracle recommends that you use Recovery Manager with a recovery catalog.
Password files and OS file backup
Password files are used to protect your environment when using Recovery Manager with an unsecured Net8 connection.
This may be the situation when you are using Recovery Manager to manage the backup of several databases from a remote location. This may also be the case when you are connecting
to the production database with a TNS alias. You must back up the password files, init.ora files, and any operating system files required for the running of your production database.
Recovery Manager packages
When you run the
catproc.sql
script, you create several packages stored in the $ORACLE_HOME/rdbms/admin subdirectory:
DMBS_RCVCAT
is used to maintain information in the recovery catalog.
DBMS_RCVMAN
is used to query information from the production database control files or the recovery catalog.
DBMS_BACKUP_RESTORE
is used to interface with the operating system (OS).
For instance, on your Windows installation, these packages are stored in the C:\Oracle\rdbms\admin directory.
In the next lesson, we will introduce a component of Oracle Enterprise Manager known as Backup Manager.
Recovery Manager Components