h.把拷贝到新机器的备份文件注册到(刚恢复的)控制文件中(redolog不能被注册,所以后有报错,没有关系):
  RMAN>catalogstartwith"/u01/ora_bak";
  Startingimplicitcrosscheckbackupat14-DEC-15
  allocatedchannel:ORA_DISK_1
  channelORA_DISK_1:SID=1146devicetype=DISK
  Crosschecked1objects
  Finishedimplicitcrosscheckbackupat14-DEC-15
  Startingimplicitcrosscheckcopyat14-DEC-15
  usingchannelORA_DISK_1
  Finishedimplicitcrosscheckcopyat14-DEC-15
  searchingforallfilesintherecoveryarea
  catalogingfiles...
  catalogingdone
  ListofCatalogedFiles
  =======================
  FileName:/u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkp
  FileName:/u01/app/oracle/fast_recovery_area/ATEST/autobackup/2015_12_09/o1_mf_s_898014415_c6hsghgm_.bkp
  FileName:/u01/app/oracle/fast_recovery_area/ATEST/autobackup/2015_12_09/o1_mf_s_898013812_c6hrvo18_.bkp
  searchingforallfilesthatmatchthepattern/u01/ora_bak
  ListofFilesUnknowntotheDatabase
  =====================================
  FileName:/u01/ora_bak/O1_MF_S_895896351_C4KSF2YN_.BKP
  FileName:/u01/ora_bak/ora_bak/arch/1_11_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_33_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_8_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_9_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_12_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_6_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_14_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_7_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_13_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_10_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_32_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/controlfile/o1_mf_c5fr9b6n_.ctl
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_2_c5fr9h1f_.log
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_3_c5fr9kfo_.log
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_1_c5fr9ds4_.log
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_3_c5fr9k9d_.log
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_2_c5fr9gy5_.log
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_1_c5fr9dmk_.log
  FileName:/u01/ora_bak/ora_bak/backupset/2015_12_07/o1_mf_nnndf_TAG20151207T173421_c6bnnxsl_.bkp
  FileName:/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp
  FileName:/u01/ora_bak/O1_MF_S_895896118_C4KS5S1R_.BKP
  Doyoureallywanttocatalogtheabovefiles(enterYESorNO)?yes
  catalogingfiles...
  catalogingdone
  ListofCatalogedFiles
  =======================
  FileName:/u01/ora_bak/ora_bak/arch/1_11_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_33_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_8_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_9_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_12_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_6_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_14_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_7_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_13_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_10_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/arch/1_32_896812716.dbf
  FileName:/u01/ora_bak/ora_bak/backupset/2015_12_07/o1_mf_nnndf_TAG20151207T173421_c6bnnxsl_.bkp
  FileName:/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp
  ListofFilesWhichWhereNotCataloged
  =======================================
  FileName:/u01/ora_bak/O1_MF_S_895896351_C4KSF2YN_.BKP
  RMAN-07518:Reason:ForeigndatabasefileDBID:966107096DatabaseName:RFDB
  FileName:/u01/ora_bak/ora_bak/controlfile/o1_mf_c5fr9b6n_.ctl
  RMAN-07519:Reason:Errorwhilecataloging.Seealert.log.
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_2_c5fr9h1f_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_3_c5fr9kfo_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/ora_bak/onlinelog_f/o1_mf_1_c5fr9ds4_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_3_c5fr9k9d_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_2_c5fr9gy5_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/ora_bak/onlinelog/o1_mf_1_c5fr9dmk_.log
  RMAN-07529:Reason:catalogisnotsupportedforthisfiletype
  FileName:/u01/ora_bak/O1_MF_S_895896118_C4KS5S1R_.BKP
  RMAN-07518:Reason:ForeigndatabasefileDBID:966107096DatabaseName:RFDB
  i.开始restore数据文件:
  RMAN>restoredatabase;
  Startingrestoreat14-DEC-15
  usingchannelORA_DISK_1
  channelORA_DISK_1:startingdatafilebackupsetrestore
  channelORA_DISK_1:specifyingdatafile(s)torestorefrombackupset
  channelORA_DISK_1:restoringdatafile00001to/u01/app/oracle/oradata/ATEST/datafile/o1_mf_system_c5fr6s3v_.dbf
  channelORA_DISK_1:restoringdatafile00002to/u01/app/oracle/oradata/ATEST/datafile/o1_mf_sysaux_c5fr6s6d_.dbf
  channelORA_DISK_1:restoringdatafile00003to/u01/app/oracle/oradata/ATEST/datafile/o1_mf_undotbs1_c5fr6s7n_.dbf
  channelORA_DISK_1:restoringdatafile00004to/u01/app/oracle/oradata/ATEST/datafile/o1_mf_users_c5fr6s88_.dbf
  channelORA_DISK_1:readingfrombackuppiece/u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkp
  channelORA_DISK_1:piecehandle=/u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkptag=TAG20151209T161546
  channelORA_DISK_1:restoredbackuppiece1
  channelORA_DISK_1:restorecomplete,elapsedtime:00:00:45
  Finishedrestoreat14-DEC-15
  j.开始recover数据(在此之前,需要先拷贝redolog到控制文件默认的路径下):
  redolog默认路径:
  SQL>selectmemberfromv$logfile;
  MEMBER
  --------------------------------------------------------------------------------
  /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.log
  /u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_3_c5fr9kfo_.log
  /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.log
  /u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_2_c5fr9h1f_.log
  /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.log
  /u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_1_c5fr9ds4_.log
  6rowsselected.
  开始recover数据库:
  RMAN>recoverdatabase;
  Startingrecoverat14-DEC-15
  usingtargetdatabasecontrolfileinsteadofrecoverycatalog
  allocatedchannel:ORA_DISK_1
  channelORA_DISK_1:SID=1137devicetype=DISK
  startingmediarecovery
  archivedlogforthread1withsequence15isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
  archivedlogforthread1withsequence16isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
  archivedlogforthread1withsequence17isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
  archivedlogforthread1withsequence18isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
  archivedlogforthread1withsequence19isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
  archivedlogforthread1withsequence20isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
  archivedlogforthread1withsequence21isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
  archivedlogforthread1withsequence22isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
  archivedlogforthread1withsequence23isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
  archivedlogforthread1withsequence24isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
  archivedlogforthread1withsequence25isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
  archivedlogforthread1withsequence26isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
  archivedlogforthread1withsequence27isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
  archivedlogforthread1withsequence28isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
  archivedlogforthread1withsequence29isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
  archivedlogforthread1withsequence30isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
  archivedlogforthread1withsequence31isalreadyondiskasfile/u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
  archivedlogforthread1withsequence32isalreadyondiskasfile/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.log
  archivedlogforthread1withsequence33isalreadyondiskasfile/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.log
  archivedlogforthread1withsequence34isalreadyondiskasfile/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.log
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_15_896812716.dbfthread=1sequence=15
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_16_896812716.dbfthread=1sequence=16
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_17_896812716.dbfthread=1sequence=17
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_18_896812716.dbfthread=1sequence=18
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_19_896812716.dbfthread=1sequence=19
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_20_896812716.dbfthread=1sequence=20
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_21_896812716.dbfthread=1sequence=21
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_22_896812716.dbfthread=1sequence=22
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_23_896812716.dbfthread=1sequence=23
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_24_896812716.dbfthread=1sequence=24
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_25_896812716.dbfthread=1sequence=25
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_26_896812716.dbfthread=1sequence=26
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_27_896812716.dbfthread=1sequence=27
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_28_896812716.dbfthread=1sequence=28
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_29_896812716.dbfthread=1sequence=29
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_30_896812716.dbfthread=1sequence=30
  archivedlogfilename=/u01/ora_bak/ora_bak/arch/1_31_896812716.dbfthread=1sequence=31
  archivedlogfilename=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.logthread=1sequence=32
  archivedlogfilename=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.logthread=1sequence=33
  archivedlogfilename=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.logthread=1sequence=34
  mediarecoverycomplete,elapsedtime:00:00:04
  Finishedrecoverat14-DEC-15
  k.以resetlogs打开数据库(在此之前,先删除原来的redolog,因为数据库会重新创建一组redolog):
  删除原来的redo:
  rm-rf/u01/app/oracle/oradata/ATEST/onlinelog/*
  以resetlogs打开数据库:
  RMAN>alterdatabaseopenresetlogs;
  usingtargetdatabasecontrolfileinsteadofrecoverycatalog
  databaseopened
  至此,数据库恢复全部完成!