1、确定auxiliary destination以及大小
确保auxiliary destination的大小能够容纳恢复过程中所产生的数据文件(建议大小至少为现有库大小的1.5倍)。
2、确保存在历史备份
RMAN> RESTORE DATABASE PREVIEW SUMMARY;Starting restore at 14-NOV-2017 14:38:51using channel ORA_DISK_1List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- -------------------- ------- ------- ---------- ---29 B 0 A DISK 14-NOV-2017 09:48:40 1 1 YES HOT_DB_BK_LEVEL137 B 1 A DISK 14-NOV-2017 09:53:10 1 1 YES HOT_DB_BK_LEVEL130 B 0 A DISK 14-NOV-2017 09:49:18 1 1 YES HOT_DB_BK_LEVEL128 B 0 A DISK 14-NOV-2017 09:41:38 1 1 YES HOT_DB_BK_LEVEL136 B 1 A DISK 14-NOV-2017 09:52:25 1 1 YES HOT_DB_BK_LEVEL127 B 0 A DISK 14-NOV-2017 09:38:26 1 1 YES HOT_DB_BK_LEVEL135 B 1 A DISK 14-NOV-2017 09:51:21 1 1 YES HOT_DB_BK_LEVEL142 B F A DISK 14-NOV-2017 14:19:50 1 1 NO TAG20171114T141949List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- -------------------- ------- ------- ---------- ---39 B A A DISK 14-NOV-2017 09:53:23 1 1 NO TAG20171114T095323List of Archived Log Copies for database with db_unique_name PROD=====================================================================Key Thrd Seq S Low Time ------- ---- ------- - --------------------640 1 234 A 14-NOV-2017 09:53:20 Name: +FRA/PROD/ARCHIVELOG/2017_11_14/thread_1_seq_234.323.960041303641 2 408 A 14-NOV-2017 09:53:22 Name: +FRA/PROD/ARCHIVELOG/2017_11_14/thread_2_seq_408.313.960041303recovery will be done up to SCN 12096446396741Media recovery start SCN is 12096446396741Recovery must be done beyond SCN 12096446435002 to clear datafile fuzzinessFinished restore at 14-NOV-2017 14:38:52或者RMAN> LIST BACKUPSET SUMMARY;
3、获取日志队列号
SELECT thread#, sequence#, first_time, next_time FROM gv$archived_logORDER BY sequence#;...... THREAD# SEQUENCE# FIRST_TIME NEXT_TIME---------- ---------- ----------------------- ----------------------- 2 406 14-NOV-2017 09:50:01 14-NOV-2017 09:53:16 2 406 14-NOV-2017 09:50:01 14-NOV-2017 09:53:16 2 407 14-NOV-2017 09:53:16 14-NOV-2017 09:53:22 2 407 14-NOV-2017 09:53:16 14-NOV-2017 09:53:22 2 408 14-NOV-2017 09:53:22 14-NOV-2017 14:08:23 2 408 14-NOV-2017 09:53:22 14-NOV-2017 14:08:23
4、编写并执行RMAN的recover脚本
RECOVER TABLESPACE tbsUNTIL LOGSEQ 407 THREAD 2AUXILIARY DESTINATION '/u03/resfile';--recover日志Starting recover at 14-NOV-2017 14:07:23using channel ORA_DISK_1RMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-timeList of tablespaces expected to have UNDO segmentsTablespace SYSTEMTablespace GZDB:SYSTEMTablespace SDDB:SYSTEMTablespace UNDOTBS1Tablespace GZDB:UNDOTBS1Tablespace SDDB:UNDOTBS1Tablespace UNDOTBS2Tablespace GZDB:UNDO_2Tablespace SDDB:UNDO_2Creating automatic instance, with SID='hDCt'initialization parameters used for automatic instance:db_name=PRODdb_unique_name=hDCt_pitr_PRODcompatible=12.2.0db_block_size=8192db_files=200diagnostic_dest=/u01/app/oracle_system_trig_enabled=FALSEsga_target=3360Mprocesses=200db_create_file_dest=/u03/resfilelog_archive_dest_1='location=/u03/resfile'enable_pluggable_database=true_clone_one_pdb_recovery=true#No auxiliary parameter file usedstarting up automatic instance PRODOracle instance startedTotal System Global Area 3523215360 bytesFixed Size 8798792 bytesVariable Size 721423800 bytesDatabase Buffers 2785017856 bytesRedo Buffers 7974912 bytesAutomatic instance createdRunning TRANSPORT_SET_CHECK on recovery set tablespacesTRANSPORT_SET_CHECK completed successfullycontents of Memory Script:{# set requested point in timeset until logseq 407 thread 2;# restore the controlfilerestore clone controlfile; # mount the controlfilesql clone 'alter database mount clone database'; # archive current online log sql 'alter system archive log current';# avoid unnecessary autobackups for structural changes during TSPITRsql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';}executing Memory Scriptexecuting command: SET until clauseStarting restore at 14-NOV-2017 14:08:05allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=92 device type=DISKchannel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring control filechannel ORA_AUX_DISK_1: reading from backup piece +FRA/PROD/AUTOBACKUP/2017_11_14/s_960025994.319.960025995channel ORA_AUX_DISK_1: piece handle=+FRA/PROD/AUTOBACKUP/2017_11_14/s_960025994.319.960025995 tag=TAG20171114T095314channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:09output file name=/u03/resfile/PROD/controlfile/o1_mf_f0o22hxv_.ctlFinished restore at 14-NOV-2017 14:08:17sql statement: alter database mount clone databasesql statement: alter system archive log currentsql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;contents of Memory Script:{# set requested point in timeset until logseq 407 thread 2;plsql <<<--declare sqlstatement varchar2(512); pdbname varchar2(128); offline_not_needed exception; pragma exception_init(offline_not_needed, -01539);begin pdbname := null; -- pdbname sqlstatement := 'alter tablespace '|| 'TBS' ||' offline immediate'; krmicd.writeMsg(6162, sqlstatement); krmicd.execSql(sqlstatement, 0, pdbname);exception when offline_not_needed then null;end; >>>;# set destinations for recovery set and auxiliary set datafilesset newname for clone datafile 1 to new;set newname for clone datafile 16 to new;set newname for clone datafile 12 to new;set newname for clone datafile 4 to new;set newname for clone datafile 18 to new;set newname for clone datafile 14 to new;set newname for clone datafile 9 to new;set newname for clone datafile 19 to new;set newname for clone datafile 15 to new;set newname for clone datafile 3 to new;set newname for clone tempfile 1 to new;set newname for datafile 10 to "+DATA/PROD/DATAFILE/tbs.289.959527251";# switch all tempfilesswitch clone tempfile all;# restore the tablespaces in the recovery set and the auxiliary setrestore clone datafile 1, 16, 12, 4, 18, 14, 9, 19, 15, 3, 10; switch clone datafile all;}executing Memory Scriptexecuting command: SET until clausesql statement: alter tablespace TBS offline immediateexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMErenamed tempfile 1 to /u03/resfile/PROD/datafile/o1_mf_temp_%u_.tmp in control fileStarting restore at 14-NOV-2017 14:08:25using channel ORA_AUX_DISK_1channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00016 to /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_system_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00018 to /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00019 to /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undo_2_%u_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u03/full_29_1_960025067channel ORA_AUX_DISK_1: piece handle=/u03/full_29_1_960025067 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:35channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00012 to /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_system_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00014 to /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00015 to /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undo_2_%u_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u03/full_30_1_960025252channel ORA_AUX_DISK_1: piece handle=/u03/full_30_1_960025252 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/resfile/PROD/datafile/o1_mf_system_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/resfile/PROD/datafile/o1_mf_undotbs1_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00009 to /u03/resfile/PROD/datafile/o1_mf_undotbs2_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/resfile/PROD/datafile/o1_mf_sysaux_%u_.dbfchannel ORA_AUX_DISK_1: restoring datafile 00010 to +DATA/PROD/DATAFILE/tbs.289.959527251channel ORA_AUX_DISK_1: reading from backup piece /u03/full_31_1_960025638channel ORA_AUX_DISK_1: piece handle=/u03/full_31_1_960025638 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45Finished restore at 14-NOV-2017 14:14:33datafile 1 switched to datafile copyinput datafile copy RECID=14 STAMP=960041674 file name=/u03/resfile/PROD/datafile/o1_mf_system_f0o2c0lo_.dbfdatafile 16 switched to datafile copyinput datafile copy RECID=15 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_system_f0o22vtl_.dbfdatafile 12 switched to datafile copyinput datafile copy RECID=16 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_system_f0o29m9h_.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=17 STAMP=960041674 file name=/u03/resfile/PROD/datafile/o1_mf_undotbs1_f0o2c0lq_.dbfdatafile 18 switched to datafile copyinput datafile copy RECID=18 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o22vs5_.dbfdatafile 14 switched to datafile copyinput datafile copy RECID=19 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o29mbm_.dbfdatafile 9 switched to datafile copyinput datafile copy RECID=20 STAMP=960041674 file name=/u03/resfile/PROD/datafile/o1_mf_undotbs2_f0o2c0kc_.dbfdatafile 19 switched to datafile copyinput datafile copy RECID=21 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o22vtj_.dbfdatafile 15 switched to datafile copyinput datafile copy RECID=22 STAMP=960041674 file name=/u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o29m9f_.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=23 STAMP=960041674 file name=/u03/resfile/PROD/datafile/o1_mf_sysaux_f0o2c0k8_.dbfcontents of Memory Script:{# set requested point in timeset until logseq 407 thread 2;# online the datafiles restored or switchedsql clone "alter database datafile 1 online";sql clone 'GZDB' "alter database datafile 16 online";sql clone 'SDDB' "alter database datafile 12 online";sql clone "alter database datafile 4 online";sql clone 'GZDB' "alter database datafile 18 online";sql clone 'SDDB' "alter database datafile 14 online";sql clone "alter database datafile 9 online";sql clone 'GZDB' "alter database datafile 19 online";sql clone 'SDDB' "alter database datafile 15 online";sql clone "alter database datafile 3 online";sql clone "alter database datafile 10 online";# recover and open resetlogsrecover clone database tablespace "TBS", "SYSTEM", "GZDB":"SYSTEM", "SDDB":"SYSTEM", "UNDOTBS1", "GZDB":"UNDOTBS1", "SDDB":"UNDOTBS1", "UNDOTBS2", "GZDB":"UNDO_2", "SDDB":"UNDO_2", "SYSAUX" delete archivelog;alter clone database open resetlogs;}executing Memory Scriptexecuting command: SET until clausesql statement: alter database datafile 1 onlinesql statement: alter database datafile 16 onlinesql statement: alter database datafile 12 onlinesql statement: alter database datafile 4 onlinesql statement: alter database datafile 18 onlinesql statement: alter database datafile 14 onlinesql statement: alter database datafile 9 onlinesql statement: alter database datafile 19 onlinesql statement: alter database datafile 15 onlinesql statement: alter database datafile 3 onlinesql statement: alter database datafile 10 onlineStarting recover at 14-NOV-2017 14:14:38using channel ORA_AUX_DISK_1channel ORA_AUX_DISK_1: starting incremental datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00016: /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_system_f0o22vtl_.dbfdestination for restore of datafile 00018: /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o22vs5_.dbfdestination for restore of datafile 00019: /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o22vtj_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u03/full_37_1_960025875channel ORA_AUX_DISK_1: piece handle=/u03/full_37_1_960025875 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01channel ORA_AUX_DISK_1: starting incremental datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00012: /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_system_f0o29m9h_.dbfdestination for restore of datafile 00014: /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o29mbm_.dbfdestination for restore of datafile 00015: /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o29m9f_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u03/full_38_1_960025941channel ORA_AUX_DISK_1: piece handle=/u03/full_38_1_960025941 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01channel ORA_AUX_DISK_1: starting incremental datafile backup set restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00010: +DATA/PROD/DATAFILE/tbs.289.959527251destination for restore of datafile 00001: /u03/resfile/PROD/datafile/o1_mf_system_f0o2c0lo_.dbfdestination for restore of datafile 00004: /u03/resfile/PROD/datafile/o1_mf_undotbs1_f0o2c0lq_.dbfdestination for restore of datafile 00009: /u03/resfile/PROD/datafile/o1_mf_undotbs2_f0o2c0kc_.dbfdestination for restore of datafile 00003: /u03/resfile/PROD/datafile/o1_mf_sysaux_f0o2c0k8_.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u03/full_39_1_960025986channel ORA_AUX_DISK_1: piece handle=/u03/full_39_1_960025986 tag=HOT_DB_BK_LEVEL1channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01starting media recoverychannel ORA_AUX_DISK_1: starting archived log restore to default destinationchannel ORA_AUX_DISK_1: restoring archived logarchived log thread=1 sequence=232channel ORA_AUX_DISK_1: restoring archived logarchived log thread=2 sequence=406channel ORA_AUX_DISK_1: reading from backup piece /u03/PROD_arch_42_1_1channel ORA_AUX_DISK_1: piece handle=/u03/PROD_arch_42_1_1 tag=TAG20171114T095323channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u03/resfile/1_232_959510681.dbf thread=1 sequence=232archived log file name=/u03/resfile/2_406_959510681.dbf thread=2 sequence=406channel clone_default: deleting archived log(s)archived log file name=/u03/resfile/2_406_959510681.dbf RECID=637 STAMP=960041686channel clone_default: deleting archived log(s)archived log file name=/u03/resfile/1_232_959510681.dbf RECID=636 STAMP=960041686media recovery complete, elapsed time: 00:00:00Finished recover at 14-NOV-2017 14:14:48database openedcontents of Memory Script:{# make read only the tablespace that will be exportedsql clone 'alter tablespace TBS read only';# create directory for datapump importsql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u03/resfile''";# create directory for datapump exportsql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''/u03/resfile''";}executing Memory Scriptsql statement: alter tablespace TBS read onlysql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u03/resfile''sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u03/resfile''Performing export of metadata... EXPDP> Warning: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database. EXPDP> Starting "SYS"."TSPITR_EXP_hDCt_jlmc": EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK EXPDP> Master table "SYS"."TSPITR_EXP_hDCt_jlmc" successfully loaded/unloaded EXPDP> ****************************************************************************** EXPDP> Dump file set for SYS.TSPITR_EXP_hDCt_jlmc is: EXPDP> /u03/resfile/tspitr_hDCt_83837.dmp EXPDP> ****************************************************************************** EXPDP> Datafiles required for transportable tablespace TBS: EXPDP> +DATA/PROD/DATAFILE/tbs.289.959527251 EXPDP> Job "SYS"."TSPITR_EXP_hDCt_jlmc" successfully completed at Tue Nov 14 14:15:51 2017 elapsed 0 00:00:41Export completedcontents of Memory Script:{# shutdown clone before importshutdown clone abort# drop target tablespaces before importing them backsql 'drop tablespace TBS including contents keep datafiles cascade constraints';}executing Memory ScriptOracle instance shut downsql statement: drop tablespace TBS including contents keep datafiles cascade constraintsPerforming import of metadata... IMPDP> Warning: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database. IMPDP> Master table "SYS"."TSPITR_IMP_hDCt_pjBy" successfully loaded/unloaded IMPDP> Starting "SYS"."TSPITR_IMP_hDCt_pjBy": IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK IMPDP> Job "SYS"."TSPITR_IMP_hDCt_pjBy" successfully completed at Tue Nov 14 14:16:26 2017 elapsed 0 00:00:11Import completedcontents of Memory Script:{# make read write and offline the imported tablespacessql 'alter tablespace TBS read write';sql 'alter tablespace TBS offline';# enable autobackups after TSPITR is finishedsql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';}executing Memory Scriptsql statement: alter tablespace TBS read writesql statement: alter tablespace TBS offlinesql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;Removing automatic instanceAutomatic instance removedauxiliary instance file /u03/resfile/PROD/datafile/o1_mf_temp_f0o2gyn1_.tmp deletedauxiliary instance file /u03/resfile/PROD/onlinelog/o1_mf_4_f0o2gsb3_.log deletedauxiliary instance file /u03/resfile/PROD/onlinelog/o1_mf_3_f0o2gs7x_.log deletedauxiliary instance file /u03/resfile/PROD/onlinelog/o1_mf_2_f0o2gs5r_.log deletedauxiliary instance file /u03/resfile/PROD/onlinelog/o1_mf_1_f0o2gs5b_.log deletedauxiliary instance file /u03/resfile/PROD/datafile/o1_mf_sysaux_f0o2c0k8_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o29m9f_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undo_2_f0o22vtj_.dbf deletedauxiliary instance file /u03/resfile/PROD/datafile/o1_mf_undotbs2_f0o2c0kc_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o29mbm_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_undotbs1_f0o22vs5_.dbf deletedauxiliary instance file /u03/resfile/PROD/datafile/o1_mf_undotbs1_f0o2c0lq_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00D634BE0535278A8C01EB1/datafile/o1_mf_system_f0o29m9h_.dbf deletedauxiliary instance file /u03/resfile/PROD/5D74D63FD00F634BE0535278A8C01EB1/datafile/o1_mf_system_f0o22vtl_.dbf deletedauxiliary instance file /u03/resfile/PROD/datafile/o1_mf_system_f0o2c0lo_.dbf deletedauxiliary instance file /u03/resfile/PROD/controlfile/o1_mf_f0o22hxv_.ctl deletedauxiliary instance file tspitr_hDCt_83837.dmp deletedFinished recover at 14-NOV-2017 14:16:34到此,recover执行完毕。但是,tbs表空间处于offline状态。
5、建议备份tbs表空间
RMAN> backup tablespace tbs;Starting backup at 14-NOV-2017 14:19:49using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00023 name=+DATA/PROD/DATAFILE/tbs.289.959527251channel ORA_DISK_1: starting piece 1 at 14-NOV-2017 14:19:49channel ORA_DISK_1: finished piece 1 at 14-NOV-2017 14:19:51piece handle=+FRA/PROD/BACKUPSET/2017_11_14/nnndf0_tag20171114t141949_0.324.960041991 tag=TAG20171114T141949 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02Finished backup at 14-NOV-2017 14:19:51Starting Control File and SPFILE Autobackup at 14-NOV-2017 14:19:51piece handle=+FRA/PROD/AUTOBACKUP/2017_11_14/s_960041991.328.960041991 comment=NONEFinished Control File and SPFILE Autobackup at 14-NOV-2017 14:19:52
6、更改TBS表空间状态为online
RMAN> alter tablespace tbs online;
参考文献: