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.[@more@]CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; CONFIGURE RETENTION POLICY TO REDUNDANCY 5; CONFIGURE RETENTION POLICY TO NONE;
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.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.CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; CONFIGURE RETENTION POLICY TO REDUNDANCY 5; CONFIGURE RETENTION POLICY TO NONE;
TheCONFIGURE [DATAFILE | ARCHIVELOG] BACKUP COPIES FOR DEVICE TYPETO
SET BACKUP COPIES command can be used to overide the default settings for individual jobs where required.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 DEFAULT DEVICE TYPE TO [DISK | SBT];
Default channels can be defined and removed using:CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
The configure command can be used to exclude tablespaces from backups. This is especially useful for read-only tablespaces:CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'C:OracleBackupTSH1%d_DB_%u_%s_%p'; CONFIGURE CHANNEL DISK 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 EXCLUDE FOR TABLESPACE[CLEAR];
The controlfile is stored using the formatCONFIGURE CONTROLFILE AUTOBACKUP [ON | OFF]; RESTORE CONTROLFILE FROM AUTOBACKUP;
c-IIIIIIIIII-YYYYMMDD-QQ which represents the database identifier, the datestamp of the backup and a hexidecimal sequence.-- Formerly SET SNAPSHOT CONTROLFILE CONFIGURE SNAPSHOT CONTROLFILE; -- Formerly SET AUXNAME CONFIGURE AUXNAME;
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:BACKUP ARCHIVELOG ALL only backs up logs that are not already on tape. BACKUP BACKUPSET ALL copies to tape all backup sets that do not already exist on tape. 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 usingCONFIGURE BACKUP OPTIMIZATION [ON | OFF | CLEAR];
CROSSCHECK.SINCE TIME option:Archive logs can now be backed up along with datafiles using theBACKUP DATABASE NOT BACKED UP SINCE TIME '15-JAN-01 01:00:00'; BACKUP DATABASE NOT BACKED UP SINCE TIME 'SYSDATE - 1';
PLUS ARCHIVELOG option. This is the default action when backing up to tape:This command results in:BACKUP DATAFILE 2 PLUS ARCHIVELOG;
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. BACKUPSET option:The range of backupsets can be limited using theBACKUP DEVICE TYPE SBT BACKUPSET ALL;
CREATED BEFORE option, with the DELETE INPUT option turning the copy into a move operation: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 theBACKUP DEVICE TYPE SBT BACKUPSET CREATED BEFORE 'SYSDATE - 7' DELETE INPUT;
FORCE option for an unconditional restore of the file.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.BLOCKRECOVER command.ANALYZE [TABLE | INDEX] commands V$BACKUP_CORRUPTION & V$COPY_CORRUPTION views list corrupt blocks in the backups, not the database itself. 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. 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';
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.REPORT NEED BACKUP command now reports files needing backup according to the retention policy: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 asREPORT NEED BACKUP DAYS 3 TABLESPACE SYSTEM; REPORT NEED BACKUP INCREMENTAL 3 DATABASE;
LIST, CROSSCHECK, DELETE and CHANGE can now function using a recovery catalog or the controlfile. LIST command can now output data in two orientations:TheLIST BACKUP .... BY [BACKUP | FILE] [SUMMARY | VERBOSE];
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.SHOW command is used to display the values of current CONFIGURE commands: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 newSHOW RETENTION POLICY, DEFAULT DEVICE TYPE; SHOW ALL;
CROSSCHECK autolocate functionality simplifies the process of finding backup pieces on multiple nodes.NOCATALOG option menaing the controlfile is used for backup and recovery information.来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/330796/viewspace-884717/ ,如需转载,请注明出处,否则将追究法律责任。