Backup Recovery   «Prev 

Creating scripts with RMAN

To use RMAN, you must first connect to it. This connection is necessary to:
  1. Authenticate you as a valid user
  2. Identify your target database, which is the database that you are backing up or restoring
  3. Identify the database containing the recovery catalog (if you use a recovery catalog)

Using backup scripts can do the following:
  1. Back up Control files
  2. Back up Archive log files
  3. Back up Tablespaces
  4. Back up data files
  5. Specify where to save the backup, disk or tape
  6. Specify more than one channel, to parallelize the process, so the backup can be done more quickly


Benefits of Using RMAN

You can perform basic backup and recovery tasks using operating system utilities and standard SQL commands. However, there are several drawbacks to using these so-called user-managed backup and recovery techniques. For example, you cannot perform incremental backups using user-managed techniques. In general, user-managed backup and recovery techniques require you to manually keep track of your backup files, their status, and their availability. You must write your own SQL and operating system scripts to manage the backup and recovery operations. In addition, you must provide the necessary data files and archived log files during a database recovery operation. If the database is operating during your backups (online or hot backups), you must place the database files in the backup mode before performing the actual file backups.
Oracle explicitly states that you can use user-managed techniques to perform backup/recovery activities. Oracle actually states that both user-managed techniques and RMAN are alternative ways of performing backup and recovery tasks. However, Oracle strongly recommends using RMAN to make your backups and perform database recovery, because of the tool’s strengths and powerful features. Although you can perform a basic backup and recovery task with user-managed techniques without ever having to even start the RMAN interface, you should make RMAN your main backup and recovery tool for several reasons. Several important backup and recovery features are available to you only through RMAN.

Here is a brief description of the important benefits of using RMAN instead of user-managed backup and recovery techniques:
  1. You can take advantage of the powerful Data Recovery Advisor feature, which enables you to easily diagnose and repair data failures and corruption
  2. There are simpler backup and recovery commands.
  3. It automatically manages the backup files without DBA intervention.
  4. It automatically deletes unnecessary backup data files and archived redo log files from both disk and tape.
  5. It provides you with detailed reporting of backup actions.
  6. It provides considerable help in duplicating a database or creating a standby database
  7. It lets you test whether you can recover your database, without actually restoring data.
  8. It lets you verify that available backups are usable for recovery.
  9. It lets you make incremental backups, which isn’t possible by any other means of backup.
  10. It lets you perform database duplication without backups by using the network-enabled database duplication feature, also known as active duplication.
  11. It automatically detects corrupt data blocks during backups, with the corruption-relevant information recorded in the V$DATABASE_BLOCK_CORRUPTION view.
  12. When only a few data blocks are corrupted, you can recover at the data block level, instead of recovering an entire data file.
  13. You can take advantage of the unused block compression feature, wherein RMAN skips unused data blocks during a backup.
  14. Only RMAN provides the ability to perform encrypted backups.
  15. You can use RMAN with a variety of third-party storage systems.
  16. You can use a powerful yet easy-to-use scripting language, which lets you write custom backup and recovery scripts quickly.