RMAN: Configuring Binary Compression

RMAN Compression
Andrey Volkov

Andrey Volkov

System, network administration + DBA. And a little programmer!)) See Author profile.

You can configure RMAN to use true binary compression when generating backup sets. You can enable compression in one of two ways:

  • Specify AS COMPRESSED BACKUPSET with the BACKUP command.
  • Use a one-time CONFIGURE command.

Here is an example of backing up with compression when issuing the BACKUP command:

RMAN> backup as compressed backupset database;

In this example, compression is configured for the disk device:

RMAN> configure device type disk backup type to compressed backupset;

If you need to clear the device-type compression, issue this command:

RMAN> configure device type disk clear;

I’ve found the default compression algorithm to be quite efficient. For a typical database the backups are usually approximately four to five times smaller than the regular backups. Of course, your compression results may vary, depending on your data.

Why not compress all backups? Compressed backups consume more CPU resources and take longer to create and restore from, but they result in less I/O, spread out over a longer period. If you have multiple CPUs, and the speed of making a backup isn’t an issue, then you should consider compressing your backups.

You can view the type of compression enabled, using the SHOW command:

RMAN> show compression algorithm;

Here is some sample output:

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT'

OPTIMIZE FOR LOAD TRUE ; # default

The basic compression algorithm doesn’t require an extra license from Oracle. If you’re using Oracle 11g Release 2 or higher, and if you have a license for the Advanced Compression option, then you have available three additional configurable levels of binary compression; for example,

RMAN> configure compression algorithm 'HIGH';

RMAN> configure compression algorithm 'MEDIUM';

RMAN> configure compression algorithm 'LOW';

In my experience the prior compression algorithms are very efficient, both in compression ratios and time taken to create backups.

You can query V$RMAN_COMPRESSION_ALGORITHM to view details regarding the compression algorithms available for your release of the database. To reset the current compression algorithm to the default of BASIC, use the CLEAR command:

RMAN> configure compression algorithm clear;

Вас заинтересует / Intresting for you:

RMAN: Specifying the Backup Us...
RMAN: Specifying the Backup Us... 1374 views Андрей Волков Sat, 29 Feb 2020, 10:14:03
RMAN: Using Online or Offline ...
RMAN: Using Online or Offline ... 785 views Андрей Волков Sat, 29 Feb 2020, 10:01:33
RMAN: Checking for Corruption ...
RMAN: Checking for Corruption ... 119 views Андрей Волков Thu, 30 Sep 2021, 11:57:27
RMAN: Setting the Degree of Pa...
RMAN: Setting the Degree of Pa... 3434 views Андрей Волков Tue, 03 Mar 2020, 16:04:20