Recovery Manager (RMAN) Enhancements In Oracle9i

Customizable Configuration Parameters

The CONFIGURE command can be used to set certain parameters once for all subsequent jobs. This data is stored in a controlfile which can be resynchronized to the recovery catalog.

A Rentention Policy defines which backup are no longer needed. This can be configured in one of two ways:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
CONFIGURE RETENTION POLICY TO NONE;
[@more@]

Recovery Manager (RMAN) Enhancements In Oracle9i

Customizable Configuration Parameters

The CONFIGURE command can be used to set certain parameters once for all subsequent jobs. This data is stored in a controlfile which can be resynchronized to the recovery catalog.

A Rentention Policy defines which backup are no longer needed. This can be configured in one of two ways:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
CONFIGURE RETENTION POLICY TO NONE;
The recovery window is used to make sure that there are always sufficent backups to recover the database to ant point in time with the last 'X' days. Any backups that fall outside this time period can be deleted. The redundancy option simply states that any backups in excess of the latest 'X' are no longer needed. The default redundancy is 1 copy. The safest option is to use the redundancy window as several backups on a single day could cause the redundancy option to mark valuable files as redundant. FInally, the redundancy policy can be cleared.

If multiple copies of each backup are required this can be configured using:
CONFIGURE [DATAFILE | ARCHIVELOG] BACKUP COPIES
FOR DEVICE TYPE  TO 
The SET BACKUP COPIES command can be used to overide the default settings for individual jobs where required.

All I/O operations require the device type to be set to disk or tape. A default value for this setting can defined using:
CONFIGURE DEFAULT DEVICE TYPE TO [DISK | SBT];
The default degree of parallelism for the device type can also also be configured such that when a command is issued the specific number of channels are allocated to the process:
CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
Default channels can be defined and removed using:
CONFIGURE CHANNEL DEVICE TYPE DISK
FORMAT 'C:OracleBackupTSH1%d_DB_%u_%s_%p';

CONFIGURE CHANNEL DISK CLEAR;
The configure command can be used to exclude tablespaces from backups. This is especially useful for read-only tablespaces:
CONFIGURE EXCLUDE FOR TABLESPACE  [CLEAR];
The configure command can be used to force a controlfile autobackup after all backup and run commands to allow controlfile recovery if the controlfile is lost and the recovery catalog was not used or is unavailable:
CONFIGURE CONTROLFILE AUTOBACKUP [ON | OFF];

RESTORE CONTROLFILE FROM AUTOBACKUP;
The controlfile is stored using the format c-IIIIIIIIII-YYYYMMDD-QQ which represents the database identifier, the datestamp of the backup and a hexidecimal sequence.

Finally, two commands have been renamed to bring them in line with the new configure command:
-- Formerly SET SNAPSHOT CONTROLFILE
CONFIGURE SNAPSHOT CONTROLFILE;

-- Formerly SET AUXNAME
CONFIGURE AUXNAME;

Backup And Restore Enhancements

The KEEP option of the backup command can be used to retain backups for longer than the retention policy indicates:
BACKUP DATABASE KEEP UNTIL TIME "TO_DATE('01-JAN-2003','DD-MON-YYYY')" NOLOGS;
BACKUP TABLESPACE tbs1 KEEP FOREVER NOLOGS;
BACKUP DATABASE KEEP;
CHANGE BACKUPSET 225 NOKEEP;
A multi-values format option is now available when creating mirrored backups. RMAN performs the first copy with the first format, the second copy with the second format etc. If more copies are defined than formats, RMAN returns to the start of the format list and uses the that format. If less copies are defined than formats, the extra formats are ignored:
RUN {
  SET BACKUP COPIES 3;
  BACKUP DATABASE
  FORMAT '/dir1/%U','/dir2/%U','/dir3/%U';
}
Backup file optimization can be used to prevent repeat backups of read-only tablespaces and archive logs:
  • Read-only and offline-clean data files are only backed up once per recovery window.
  • The command BACKUP ARCHIVELOG ALL only backs up logs that are not already on tape.
  • The command BACKUP BACKUPSET ALL copies to tape all backup sets that do not already exist on tape.
Backup optimization is configured using:
CONFIGURE BACKUP OPTIMIZATION [ON | OFF | CLEAR];
If your current media manager has it's own expiration policy this may interfere with backup optimization. Periodic synchronization between RMAN and the media manager can be performed using CROSSCHECK.

Restartable backups allow failed backups to be restarted where they left off using the SINCE TIME option:
BACKUP DATABASE NOT BACKED UP SINCE TIME '15-JAN-01 01:00:00';
BACKUP DATABASE NOT BACKED UP SINCE TIME 'SYSDATE - 1';
Archive logs can now be backed up along with datafiles using the PLUS ARCHIVELOG option. This is the default action when backing up to tape:
BACKUP DATAFILE 2 PLUS ARCHIVELOG;
This command results in:
  • ALTER SYSTEM ARCHIVE LOG CURRENT
  • BACKUP ARCHIVELOG ALL
  • BACKUP of specified files.
  • ALTER SYSTEM ARCHIVE LOG CURRENT
  • BACKUP of any archived logs generated during the backup.
RMAN no longer signals errors when no relevant archivelogs are found:

It is now possible for RMAN to copy or move backupsets from disk to tape using the BACKUPSET option:
BACKUP DEVICE TYPE SBT BACKUPSET ALL;
The range of backupsets can be limited using the CREATED BEFORE option, with the DELETE INPUT option turning the copy into a move operation:
BACKUP DEVICE TYPE SBT
BACKUPSET
CREATED BEFORE 'SYSDATE - 7'
DELETE INPUT;
Restore operations are now optimized such that if the current datafile header is consistent with the backup datafile it will be skipped. This prevents unnecessary restores and allows for restartable restore operations. Only file headers are checked when making this decision. If you suspect a file contains block corruption you must use the FORCE option for an unconditional restore of the file.

Oracle Enterprise Manager has been updated to include all the new RMAN functionality.

Reliability Enhancements

Archive log failover allows RMAN can take advantage of multiple archive logs destinations such that, if a corrupt log is detected it can read the log from the alternate destination.

The DELETE ALL INPUT option can be used along with the BACKUP ARCHIVELOG command to delete archive logs from multiplexed destinations once they've been sucessfully backed up.

RMAN performs automatic log switches at the end of any backup or copy operations. The resulting log is archived to increase the chances of sucessful recovery.

If multiple copies of backup pieces are created at different locations RMAN can use backup piece failover during restore operations. If a backup piece is invalid or corrupt an alternate copy is used. An error will only be issued if a valid copy cannot be found.

Block Media Recovery (BMR) allows specified blocks to be recovered without affecting the entire datafile. It is only intended for use where a known and limited number of blocks is affected. This results in a reduced mean time to recovery (MTTR) and higher availability as only the affected blocks are offline during the operation. BMR can only be performed via RMAN using the BLOCKRECOVER command.

Corrupt blocks can be identified using:
  • Error messages
  • The alert log
  • Trace files
  • ANALYZE [TABLE | INDEX] commands
  • The dbverify utility
  • The V$BACKUP_CORRUPTION & V$COPY_CORRUPTION views list corrupt blocks in the backups, not the database itself.
  • The new view V$DATABASE_BLOCK_CORRUPTION lists corrupt blocks in the database detected during the backup operation. Recovered blocks will still be listed until the next backup is performed.
Once detected, corrupt blocks can be recovered individually. Alternatively, the CORRUPTION LIST option can be used to recover all blocks listed in the V$DATABASE_BLOCK_CORRUPTION view. This list can be limited using the UNTIL option:
BLOCKRECOVER DATAFILE 3 BLOCK 121;
BLOCKRECOVER CORRUPTION LIST RESTORE UNTIL TIME 'SYSDATE - 7';

General Enhancements

The REPORT OBSOLETE command now displays obsolete archive logs as well as datafiles. In addition the DELETE OBSOLETE command can be used to delete those files listed by the REPORT OBSOLETE command.

The REPORT NEED BACKUP command now reports files needing backup according to the retention policy:
REPORT NEED BACKUP DAYS 3 TABLESPACE SYSTEM;
REPORT NEED BACKUP INCREMENTAL 3 DATABASE;
If a recovery catalog is not specified all commands assume the control file should be used to store backup and recovery information. With this in mind several RMAN commands such as LIST, CROSSCHECK, DELETE and CHANGE can now function using a recovery catalog or the controlfile.

The LIST command can now output data in two orientations:
LIST BACKUP .... BY [BACKUP | FILE] [SUMMARY | VERBOSE];
The BY BACKUP orientation shows backupsets and their contents alonmg with backup copies of any file. This is the default providing no OF option is specified. The SUMMARY option gives a one-line summary for each file or backupset. The BY FILE orientation shows the file name, backupset it's from and copies of the file.

The SHOW command is used to display the values of current CONFIGURE commands:
SHOW RETENTION POLICY, DEFAULT DEVICE TYPE;
SHOW ALL;
In Real Application Clusters (RAC) different objects can exist only on a single node, but may exist on disk or tape. Using multiple channels, the new CROSSCHECK autolocate functionality simplifies the process of finding backup pieces on multiple nodes.

The RMAN display is neater since RMAN-nnnnn messages are only printed when errors occur. Oracle Manages Files (OMF) are now supported by RMAN. If files with differing block sizes are backed up in the same command RMAN will separate them into different backup sets. By default RMAN uses the NOCATALOG option menaing the controlfile is used for backup and recovery information.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/330796/viewspace-884717/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/330796/viewspace-884717/

你可能感兴趣的:(Recovery Manager (RMAN) Enhancements In Oracle9i)