Oracle 10 Gb rman backup and recovery 4 nocatalog rman recover dbid used to restore spfile and controlfile use configure controlfile autobackup on; backup database plus archivelog delete input; backup supplement RMAN> show all2>; RMAN configuration parameters are: configure retention policy to redundancy 1; # defaultCONFIGURE backup optimization off; # defaultCONFIGURE default device type to disk; # defaconfigconfigure controlfile autobackup on; CONFIGURE CON Trolfile autobackup format for device type disk to '% F'; # defaultCONFIGURE device type disk parallelism 1 backup type to backupset; # defaultCONFIGURE datafile backup copies for device type disk to 1; # defaultCONFIGURE archivelog backup copies for device type disk to 1; # defaultCONFIGURE maxsetsize to unlimited; # defaultCONFIGURE encryption for database off; # defaconfigconfigure ENCRYPTION ALGOR ITHM 'aes128 '; # defaultCONFIGURE archivelog deletion policy to none; # defaultCONFIGURE snapshot controlfile name to'/oracle/ora10g/product/10.2.0/db_1/dbs/snapcf_wolf.f '; # default prevents the loss of controlfile configure controlfile autobackup on. When enabled, controlfile and spfile are automatically backed up. delete all the previous backups first. delete backupset RMAN> delete backupset 6522>; using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc # Cp # Status Device Type Piece Name ------- --- ----------- ---------- 658 652 1 1 available disk/oracle/ora10g/flash_recovery_area/WOLF/autobackup/2013_04_21/snapshot _. bkpDo you really want to delete the above objects (enter YES or NO )? Yesdeleted backup piecebackup piece handle =/oracle/ora10g/flash_recovery_area/WOLF/autobackup/2013_04_21/o1_mf_s_813295785_8q75c9pw _. bkp recid = 44 stamp = 813295785 Deleted 1 object below is what I Deleted with rm in the system first. After Deleted in the OS, there will be information in rman, And crosscheck backupset must be used, mark and delete the file. RMAN> delete backupset 5522>; using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc # Cp # Status Device Type Piece Name ------- --- ----------- ---------- 555 552 1 available disk/oracle/ora10g/rmanback/Thank you really want to delete the above objects (enter YES or NO )? YesRMAN-06207: WARNING: 1 objects cocould not be deleted for DISK channel (s) dueRMAN-06208: to mismatched status. use CROSSCHECK command to fix statusRMAN-06210: List of Mismatched objectsRMAN-06211: ========================== RMAN-06212: object Type Filename/HandleRMAN-06213: --------------------------------------------------------------- RMAN-06214: Backup Piece/oracle/ora10g/rmanback/inc0_1eo7 Response> CROSSCHECK backupset; using channel ORA_DISK_1crosschecked backup piece: found to be 'expired' backup piece handle =/oracle/ora10g/rmanback/full_T % recid = 35 stamp = 813237736 crosschecked backup piece: found to be 'expired' backup piece handle =/oracle/ora10g/rmanback/full_20130420 recid = 37 stamp = 813238342 crosschecked backup piece: found to be 'expired' backup piece handle =/oracle/ora10g /Rmanback/inc0_1co7jn4l_20130421 recid = 39 stamp = 813292693 crosschecked backup piece: found to be 'expired' backup piece handle =/oracle/ora10g/rmanback/inc0_1eo7jo4g_20130421 recid = 41 stamp = 813293712 Crosschecked 4 objectsRMAN> delete noprompt expired backup; using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc # Cp # Status Device Type Piece Name ------------------------------------------- --------- 398 395 1 expired disk/oracle/ora10g/rmanback/full_T % 433 430 1 1 expired disk/oracle/ora10g/rmanback/full_20130420494 491 1 1 expired disk/oracle/ora10g/ rmanback/release 552 1 expired disk/oracle/ora10g/rmanback/restore backup piecebackup piece handle =/oracle/ora10g/rmanback/full_T % recid = 35 stamp = 813237736 deleted backup piecebackup piece ha Ndle =/oracle/ora10g/rmanback/reply recid = 37 stamp = 813238342 deleted backup piecebackup piece handle =/oracle/ora10g/rmanback/reply recid = 39 stamp = 813292693 deleted backup piecebackup piece handle =/oracle/ora10g/rmanback/inc0_1eo7jo4g_20130421 recid = 41 stamp = 813293712 Deleted 4 EXPIRED objectsRMAN> list backupset; RMAN> ------------------------------------------------------------ ---------------------------------- Backup format'/oracle/ora10g/rmanback/full _ % u _ % T. bak 'database plus archivelog; restore recovery 1. Password File restore [root @ redhat dbs] # pwd/oracle/ora10g/product/10.2.0/db_1/dbs [root @ redhat dbs] # lshc_wolf.dat initdw. ora init. ora lkDUMMY lkWOLF orapwwolf snapcf_wolf.f spfilewolf. ora [root @ redhat dbs] # assuming that the password file is lost, recreate the password file [or Acle @ redhat ~] $ Cd/oracle/ora10g/product/10.2.0/db_1/dbs [oracle @ redhat dbs] $ orapwd file = orapwwolf password = 123456 entries = 5 [oracle @ redhat dbs] $ lshc_wolf.dat initdw. ora init. ora lkDUMMY lkWOLF orapwwolf. bak snapcf_wolf.f spfilewolf. ora [oracle @ redhat dbs] $ [oracle @ redhat dbs] $ orapwdUsage: orapwd file = <fname> password = <password> entries = <users> force = <y/n> where file-name of password file (mand ), password-password for SYS (mand), entries-maximum number of distinct DBA and force-whether to overwrite existing file (opt), OPERs (opt ), there are no spaces around the equal-to (=) character.2, spfile loss (dbid = 3778783462) startup nomount set dbid dbid_number restore spfile from autobackup shutdown immediate set dbid dbid_number startup simulate loss of spfileSQL> show parameter spfileNAME type value =----------- your spfile string/oracle/users/product/10.2.0/db_1/ dbs/spfilewolf. oraSQL> ([root @ redhat db_1] # cd dbs [root @ redhat dbs] # ls hc_wolf.dat init. ora lkWOLF snapcf_wolf.f initdw. ora lkDUMMY orapwwolf spfilewolf. ora [root @ redhat dbs] # mv spfilewolf. ora spfilewolf. ora. bak [root @ redhat dbs] # ls hc_wolf.dat init. ora lkWOLF snapcf_wolf.f initdw. ora lkDUMMY orapwwolf spfilewolf. ora. bak [root @ redhat dbs] # pwd/oracle/ora10g/product/10.2.0/db_1/dbs) RMAN> startup nomount; RMAN> set dbid 3778783462 RMAN> restore spfile from autobackup (the actual path is also good) RMAN> shutdown immediateRMAN> set dbid 3778783462 (if there is a problem with Direct start, set dbid again) RMAN> startupRMAN> shutdown immediatedatabase closeddatabase dismountedOracle instance shut downRMAN> startup nomountconnected to target database (not started) startup failed: ORA-01078: failure in processing system parametersLRM-00109: cocould not open parameter file '/oracle/ora10g/product/10.2.0/db_1/dbs/initwolf. ora 'starting Oracle instance without parameter file for retrival of spfileOracle instance startedTotal System Global Area 159383552 bytesFixed Size 1218268 bytesVariable Size 54528292 bytesDatabase Buffers 100663296 bytesRedo Buffers 2973696 bytesRMAN> set dbid 3778783462 executcommand: set dbidrman> restore spfile from autobackup; Starting restore at 21-4 months-13 allocated channel: ORA_DISK_1channel ORA_DISK_1: sid = 36 devtype = DISKchannel ORA_DISK_1: looking for autobackup on day: 20130421 channel ORA_DISK_1: looking for autobackup on day: 20130420 channel ORA_DISK_1: looking for autobackup on day: 20130419 channel ORA_DISK_1: looking for autobackup on day: 20130418 channel ORA_DISK_1: looking for autobackup on day: 20130417 channel ORA_DISK_1: looking for autobackup on day: 20130416 channel ORA_DISK_1: looking for autobackup on day: 20130415 channel ORA_DISK_1: no autobackup in 7 days foundRMAN-00571: ========================================================== ============================== RMAN-00569: ================ error message stack follows ============================ RMAN-00571: ========================================================== ============================== RMAN-03002: failure of restore command at 04/21/2013 10: 02: 43RMAN-06172: no autobackup found or specified handle is not a valid copy or piece RMAN> restore spfile from '/oracle/ora10g/flash_recovery_area/WOLF/backupset/2013_04_21/empty _. bkp '; Starting restore at-13 using channel ORA_DISK_1channel ORA_DISK_1: autobackup found:/oracle/ora10g/flash_recovery_area/WOLF/backupset/2013_04_21/empty _. bkpchannel ORA_DISK_1: SPFILE restore from autobackup completeFinished restore at-13 ([root @ redhat dbs] # ls hc_wolf.dat init. ora lkWOLF snapcf_wolf.f spfilewolf. ora. bak initdw. ora lkDUMMY orapwwolf spfilewolf. ora) RMAN> shutdown immediateOracle instance shut downRMAN> startupconnected to target database (not started) oracle instance starteddatabase mounteddatabase openedTotal System Global Area 285212672 bytesFixed Size 1218992 bytesVariable Size 92276304 bytesDatabase Buffers 188743680 bytesRedo Buffers 2973696 bytesRMAN>