904 Bedford St, New York NY 10014

(+1) 5184-453-1514

Use Online Backups – RMAN Backups and Reporting

Most production databases have 24/7 availability requirements. Therefore, you need to take online RMAN backups.

Your database must be in archivelog mode for online backups and to be able to recover to a point in time.

You need to consider carefully how to place archivelogs, how to format them, how often to back them up, and how long to retain them before deletion.

Set the Archivelog Destination and File Format Oracle writes the archivelogs to one or more of the following locations:

•     Default location

•     FRA

•     Location specified via the LOG_ARCHIVE_DEST_N initialization parameters

If you do not use an FRA and if you do not explicitly set the archivelog destination via a LOG_ARCHIVE_DEST_N initialization parameter, then by default the archivelogs are written to an OS-dependent location with the format %t_%s_%r.dbf (%t is the timestamp, %s is the log sequence number, and %r is the log ID).

With FRA, by default the archivelogs are written to a directory in the FRA. The default filename format of the archivelog files created in the FRA is Oracle Managed File (OMF). It is better to set the parameters and choose a format:

log_archive_dest_1 = ‘LOCATION=/oraarch1/mmdb23c’ log_archive_format = ‘%t_%s_%r.arc’

The .arc extension avoids the potentially confusing task of identifying a file as an archivelog file or a live database data file.

Configure Channel Format

When writing to multiple disk locations, it is easier to specify the directories using CONFIGURE CHANNEL … FORMAT. Here is a typical configuration specifying the following:

RMAN> configure device type disk parallelism 3;

RMAN> configure channel 1 device type disk format ‘/u01/db23c/rman/rman1_%U.bk’;

RMAN> configure channel 2 device type disk format ‘/u02/db23c/rman/rman2_%U.bk’; RMAN> configure channel 3 device type disk format ‘/u03/db23c/rman/rman3_%U.bk’;

In these lines of code, you should configure the device-type parallelism degree to match the number of channels that you allocated.

RMAN allocates the number of channels as specified by the degree of parallelism; other configured channels are ignored.

For instance, if you specify a degree of parallelism of 2, RMAN allocates only two channels, regardless of the number of channels you configured via the CONFIGURE CHANNEL command.

In this example of configuring three channels, suppose the BACKUP command is issued, like this:

RMAN> backup database;

RMAN allocates three channels, all on separate mount points (/u01, /u02, /u03), and writes in parallel to the specified locations. RMAN creates as many backup pieces in the three locations as it deems necessary to create a backup of the database.

If after running the backup you need to unconfigure a channel, do so as follows:

RMAN> configure channel 3 device type disk clear;

Search

Popular Posts

  • Recovery Catalog Versions – RMAN Backups and Reporting
    Recovery Catalog Versions – RMAN Backups and Reporting

    I recommend that you create a recovery catalog for each version of the target databases that you are backing up. Doing so will save you some headaches with compatibility issues and upgrades. I have found it easier to use a recovery catalog when the database version of the rman client is the same version used…

  • Registering a Target Database – RMAN Backups and Reporting
    Registering a Target Database – RMAN Backups and Reporting

    Now, you can register a target database with the recovery catalog. Log in to the target database server. Ensure that you can establish connectivity to the recovery catalog database. For instance, one approach is to populate the TNS_ADMIN/tnsnames.ora file with an entry that points to the remote database. On the target database server, register the…

  • Creating a Recovery Catalog – RMAN Backups and Reporting
    Creating a Recovery Catalog – RMAN Backups and Reporting

    When I use a recovery catalog, I prefer to have a dedicated database that is used only for the recovery catalog. This ensures that the recovery catalog is not affected by any maintenance or downtime required by another application (and vice versa). Listed next are the steps for creating a recovery catalog: 1. Create a…

Tags