基於時間點RMAN恢復
阿新 • • 發佈:2018-11-23
二. 恢復步驟: 1. 引數檔案恢復 [[email protected] ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Tue Sep 5 05:50:45 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) RMAN> startup nomount; startup failed: ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/home/app/oracle/product/11.2/db_1/dbs/initorcl.ora' starting Oracle instance without parameter file for retrieval of spfile Oracle instance started Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 348128136 bytes Database Buffers 708837376 bytes Redo Buffers 9711616 bytes RMAN> RMAN> restore spfile to '/home/oracle/spfileorcl.ora' from '/data/www/chroot/oradata/upload/rman/p2p/ORCL_spfile_75_20170908'; Starting restore at 05-SEP-17 using channel ORA_DISK_1 channel ORA_DISK_1: restoring spfile from AUTOBACKUP /home/oracle/backup/p2p/ORCL_spfile_45_20170904 channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete Finished restore at 05-SEP-17 RMAN> 2. 修改pfile nomount: [
[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Sep 5 06:01:01 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> create pfile='/home/oracle/p2ptest.ora' from spfile='/home/oracle/spfileorcl.ora'; File created. SQL> 修改好的引數如下: orcl.__db_cache_size=11576279040 orcl.__java_pool_size=234881024 orcl.__large_pool_size=268435456 *.__oracle_base='/home/app/oracle'# ORACLE_BASE set from environment orcl.__pga_aggregate_target=4664066048 orcl.__sga_target=13958643712 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=1744830464 orcl.__streams_pool_size=0 *._aggregation_optimization_settings=0 *._always_anti_join='CHOOSE' *._always_semi_join='CHOOSE' *._and_pruning_enabled=TRUE *._b_tree_bitmap_plans=TRUE *._bloom_filter_enabled=TRUE *._bloom_folding_enabled=TRUE *._bloom_pruning_enabled=TRUE *._complex_view_merging=TRUE *._compression_compatibility='11.2.0.4.0' *._connect_by_use_union_all='TRUE' *._convert_set_to_join=FALSE *._cost_equality_semi_join=TRUE *._cpu_to_io=0 *._dimension_skip_null=TRUE *._eliminate_common_subexpr=TRUE *._enable_type_dep_selectivity=TRUE *._fast_full_scan_enabled=TRUE *._first_k_rows_dynamic_proration=TRUE *._gby_hash_aggregation_enabled=TRUE *._generalized_pruning_enabled=TRUE *._globalindex_pnum_filter_enabled=TRUE *._gs_anti_semi_join_allowed=TRUE *._improved_outerjoin_card=TRUE *._improved_row_length_enabled=TRUE *._index_join_enabled=TRUE *._ksb_restart_policy_times='0','60','120','240'# internal update to set default *._left_nested_loops_random=TRUE *._local_communication_costing_enabled=TRUE *._minimal_stats_aggregation=TRUE *._mmv_query_rewrite_enabled=TRUE *._new_initial_join_orders=TRUE *._new_sort_cost_estimate=TRUE *._nlj_batching_enabled=1 *._optim_adjust_for_part_skews=TRUE *._optim_enhance_nnull_detection=TRUE *._optim_new_default_join_sel=TRUE *._optim_peek_user_binds=TRUE *._optimizer_adaptive_cursor_sharing=TRUE *._optimizer_better_inlist_costing='ALL' *._optimizer_cbqt_no_size_restriction=TRUE *._optimizer_coalesce_subqueries=TRUE *._optimizer_complex_pred_selectivity=TRUE *._optimizer_compute_index_stats=TRUE *._optimizer_connect_by_combine_sw=TRUE *._optimizer_connect_by_cost_based=TRUE *._optimizer_connect_by_elim_dups=TRUE *._optimizer_correct_sq_selectivity=TRUE *._optimizer_cost_based_transformation='LINEAR' *._optimizer_cost_hjsmj_multimatch=TRUE *._optimizer_cost_model='CHOOSE' *._optimizer_dim_subq_join_sel=TRUE *._optimizer_distinct_agg_transform=TRUE *._optimizer_distinct_elimination=TRUE *._optimizer_distinct_placement=TRUE *._optimizer_eliminate_filtering_join=TRUE *._optimizer_enable_density_improvements=TRUE *._optimizer_enable_extended_stats=TRUE *._optimizer_enable_table_lookup_by_nl=TRUE *._optimizer_enhanced_filter_push=TRUE *._optimizer_extend_jppd_view_types=TRUE *._optimizer_extended_cursor_sharing='UDO' *._optimizer_extended_cursor_sharing_rel='SIMPLE' *._optimizer_extended_stats_usage_control=192 *._optimizer_false_filter_pred_pullup=TRUE *._optimizer_fast_access_pred_analysis=TRUE *._optimizer_fast_pred_transitivity=TRUE *._optimizer_filter_pred_pullup=TRUE *._optimizer_fkr_index_cost_bias=10 *._optimizer_full_outer_join_to_outer=TRUE *._optimizer_group_by_placement=TRUE *._optimizer_improve_selectivity=TRUE *._optimizer_interleave_jppd=TRUE *._optimizer_join_elimination_enabled=TRUE *._optimizer_join_factorization=TRUE *._optimizer_join_order_control=3 *._optimizer_join_sel_sanity_check=TRUE *._optimizer_max_permutations=2000 *._optimizer_mode_force=TRUE *._optimizer_multi_level_push_pred=TRUE *._optimizer_native_full_outer_join='FORCE' *._optimizer_new_join_card_computation=TRUE *._optimizer_null_aware_antijoin=TRUE *._optimizer_or_expansion='DEPTH' *._optimizer_order_by_elimination_enabled=TRUE *._optimizer_outer_join_to_inner=TRUE *._optimizer_outer_to_anti_enabled=TRUE *._optimizer_push_down_distinct=0 *._optimizer_push_pred_cost_based=TRUE *._optimizer_rownum_bind_default=10 *._optimizer_rownum_pred_based_fkr=TRUE *._optimizer_skip_scan_enabled=TRUE *._optimizer_sortmerge_join_inequality=TRUE *._optimizer_squ_bottomup=TRUE *._optimizer_star_tran_in_with_clause=TRUE *._optimizer_system_stats_usage=TRUE *._optimizer_table_expansion=TRUE *._optimizer_transitivity_retain=TRUE *._optimizer_try_st_before_jppd=TRUE *._optimizer_undo_cost_change='11.2.0.4' *._optimizer_unnest_corr_set_subq=TRUE *._optimizer_unnest_disjunctive_subq=TRUE *._optimizer_use_cbqt_star_transformation=TRUE *._optimizer_use_feedback=TRUE *._or_expand_nvl_predicate=TRUE *._ordered_nested_loop=TRUE *._parallel_broadcast_enabled=TRUE *._partition_view_enabled=TRUE *._pivot_implementation_method='CHOOSE' *._pre_rewrite_push_pred=TRUE *._pred_move_around=TRUE *._push_join_predicate=TRUE *._push_join_union_view=TRUE *._push_join_union_view2=TRUE *._px_minus_intersect=TRUE *._px_partition_scan_enabled=TRUE *._px_pwg_enabled=TRUE *._px_ual_serial_input=TRUE *._query_rewrite_setopgrw_enable=TRUE *._remove_aggr_subquery=TRUE *._replace_virtual_columns=TRUE *._right_outer_hash_enable=TRUE *._selfjoin_mv_duplicates=TRUE *._sql_model_unfold_forloops='RUN_TIME' *._subquery_pruning_enabled=TRUE *._subquery_pruning_mv_enabled=FALSE *._table_scan_cost_plus_one=TRUE *._union_rewrite_for_gs='YES_GSET_MVS' *._unnest_subquery=TRUE *._use_column_stats_for_function=TRUE *.audit_file_dest='/home/app/oracle/admin/orcl/adump' *.audit_trail='DB' #*.background_dump_dest='/home/app/oracle/diag/rdbms/stdo/orcl/trace'#Deprecate parameter *.compatible='11.2.0.4.0' *.control_files='/home/app/oracle/oradata/current.257.951497703','/home/app/oracle/oradata/current.256.951497703'#Set by RMAN *.core_dump_dest='/home/app/oracle/diag/rdbms/stdo/orcl/cdump' *.db_block_size=8192 *.db_create_file_dest='/home/app/oracle/oradata/' *.db_create_online_log_dest_1='/home/app/oracle/oradata/' *.db_domain='' *.db_name='orcl' *.db_recovery_file_dest='/home/app/oracle/oradata/arch/' *.db_recovery_file_dest_size=30000M *.db_unique_name='stdo' *.diagnostic_dest='/home/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' *.fal_server='orcl' *.log_archive_config='dg_config=(stdo,orcl)' *.log_archive_dest_1='LOCATION=/home/app/oracle/oradata/arch/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stdo' *.log_archive_dest_2='SERVICE=orcl LGWR ASYNC=20480 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl OPTIONAL REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30' *.log_archive_dest_state_1='ENABLE' *.log_archive_dest_state_2='ENABLE' *.log_archive_format='stdo_%s_%t_%r.arc' *.log_archive_min_succeed_dest=1 *.log_buffer=34873344# log buffer update *.open_cursors=300 *.optimizer_dynamic_sampling=2 *.optimizer_mode='ALL_ROWS' *.pga_aggregate_target=4431M *.plsql_warnings='DISABLE:ALL'# PL/SQL warnings at init.ora *.processes=1500 *.query_rewrite_enabled='TRUE' *.remote_login_passwordfile='EXCLUSIVE' *.result_cache_max_size=68160K *.sessions=2280 *.sga_target=13G *.skip_unusable_indexes=TRUE *.standby_file_management='AUTO' *.undo_tablespace='UNDOTBS1' #*.user_dump_dest='/home/app/oracle/diag/rdbms/stdo/orcl/trace'#Deprecate parameter log_file_name_convert = '+datad/stdo/onlinelog/','/home/app/oracle/oradata/' 37節點: orcl.__db_cache_size=5596567552 orcl.__java_pool_size=134881024 orcl.__large_pool_size=134881024 orcl.__pga_aggregate_target=2664066048 orcl.__sga_target=6958643712 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=1758096384 orcl.__streams_pool_size=23554432 *.audit_file_dest='/u01/app/oracle/admin/p2ptest/adump' *.audit_trail='db' *.compatible='11.2.0.4.0' *.control_files='/u01/app/oracle/oradata/p2ptest/current.261.929551543','/u01/app/oracle/oradata/p2ptest/current.260.929551543' *.db_block_size=8192 *.db_create_file_dest='/u01/app/oracle/oradata/p2ptest/' *.db_domain='' *.db_name='p2ptest' *.db_recovery_file_dest='/u01/app/oracle/oradata/p2ptest/arch/' *.db_recovery_file_dest_size=31457280000 *.db_unique_name='ORCL' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' #*.log_archive_config='dg_config=(orcl,stdo)' *.log_archive_dest_1='LOCATION=/u01/app/oracle/oradata/p2ptest/arch/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=p2ptest' #*.log_archive_dest_2='SERVICE=stdo LGWR ASYNC=20480 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdo OPTIONAL REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30' *.log_archive_dest_state_1='ENABLE' #*.log_archive_dest_state_2='ENABLE' *.log_archive_format='orcl_%s_%t_%r.arc' *.log_archive_min_succeed_dest=1 *.open_cursors=300 *.pga_aggregate_target=2646240256 *.processes=1500 *.remote_login_passwordfile='EXCLUSIVE' *.sessions=1655 *.sga_target=7938720768 #*.standby_file_management='AUTO' *.undo_tablespace='UNDOTBS1' 啟動到nomount: SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup nomount pfile='/home/oracle/p2ptest.ora'; ORACLE instance started. Total System Global Area 1.3896E+10 bytes Fixed Size 2266504 bytes Variable Size 2650802808 bytes Database Buffers 1.1207E+10 bytes Redo Buffers 36069376 bytes SQL> 3. 恢復控制檔案mount: 這一步根據MOS : Step by Step method to create Primary/Standby Database from Standby Backup (Doc ID 1604251.1) 需要在恢復庫安裝針對bug 7553431的patch 18455956 restore controlfile from '/data/www/chroot/oradata/upload/rman/p2p/ORCL_cont_1_122_20170912'; RMAN> restore primary controlfile from '/data/www/chroot/oradata/upload/rman/p2p/ORCL_cont_74_20170908'; Starting restore at 05-SEP-17 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1873 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/home/app/oracle/oradata/current.257.951497703 output file name=/home/app/oracle/oradata/current.256.951497703 Finished restore at 05-SEP-17 RMAN> RMAN> alter database mount; database mounted released channel: ORA_DISK_1 RMAN> 4. 註冊備份檔案: RMAN> catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_arch_73_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_cont_74_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_63_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_64_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_65_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_66_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_67_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_68_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_69_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_70_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_71_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_incr0_72_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_spfile_75_20170908' ; catalog backuppiece '/data/www/chroot/oradata/upload/rman/p2p/ORCL_arch_76_20170908' ; 5. 資料檔案改名: run{ allocate channel c1 type disk; allocate channel c2 type disk; set newname for datafile '+DATA/orcl/datafile/system.256.929551493' to '/u01/app/oracle/oradata/p2ptest/system.dbf' ; set newname for datafile '+DATA/orcl/datafile/sysaux.257.929551493' to '/u01/app/oracle/oradata/p2ptest/sysaux.dbf' ; set newname for datafile '+DATA/orcl/datafile/undotbs1.258.929551493' to '/u01/app/oracle/oradata/p2ptest/undotbs1.dbf' ; set newname for datafile '+DATA/orcl/datafile/users.259.929551493' to '/u01/app/oracle/oradata/p2ptest/users.dbf' ; set newname for datafile '+DATA/orcl/datafile/sascs.271.929552865' to '/u01/app/oracle/oradata/p2ptest/sascs.dbf' ; set newname for datafile '+DATA/orcl/datafile/licaisas.272.929552885' to '/u01/app/oracle/oradata/p2ptest/licaisas.dbf' ; set newname for datafile '+DATA/orcl/datafile/newurgesp.273.929552907' to '/u01/app/oracle/oradata/p2ptest/newurgesp.dbf' ; set newname for datafile '+DATA/orcl/datafile/webp2pidxsp.274.929552931' to '/u01/app/oracle/oradata/p2ptest/webp2pidxsp.dbf'; set newname for datafile '+DATA/orcl/datafile/webp2psp.275.929552949' to '/u01/app/oracle/oradata/p2ptest/webp2psp.dbf' ; set newname for datafile '+DATA/orcl/datafile/docidxsp.276.929552965' to '/u01/app/oracle/oradata/p2ptest/docidxsp.dbf' ; set newname for datafile '+DATA/orcl/datafile/docsp.277.929552997' to '/u01/app/oracle/oradata/p2ptest/docsp.dbf' ; set newname for datafile '+DATA/orcl/datafile/urgesp.278.929553027' to '/u01/app/oracle/oradata/p2ptest/urgesp1.dbf' ; set newname for datafile '+DATA/orcl/datafile/urgesp.279.929553039' to '/u01/app/oracle/oradata/p2ptest/urgesp2.dbf' ; set newname for datafile '+DATA/orcl/datafile/salarysp.280.929553083' to '/u01/app/oracle/oradata/p2ptest/salarysp.dbf' ; set newname for datafile '+DATA/orcl/datafile/websp.281.929553099' to '/u01/app/oracle/oradata/p2ptest/websp.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspidxsp.282.929553121' to '/u01/app/oracle/oradata/p2ptest/clspidxsp.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspsp.283.929553141' to '/u01/app/oracle/oradata/p2ptest/clspsp1.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspsp.284.929553161' to '/u01/app/oracle/oradata/p2ptest/clspsp2.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspsp.285.929553183' to '/u01/app/oracle/oradata/p2ptest/clspsp3.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspsp.286.929553203' to '/u01/app/oracle/oradata/p2ptest/clspsp4.dbf' ; set newname for datafile '+DATA/orcl/datafile/clspsp.287.929553227' to '/u01/app/oracle/oradata/p2ptest/clspsp5.dbf' ; set newname for datafile '+DATA/orcl/datafile/fcidxsp.288.929553307' to '/u01/app/oracle/oradata/p2ptest/fcidxsp.dbf' ; set newname for datafile '+DATA/orcl/datafile/fcsp.289.929553323' to '/u01/app/oracle/oradata/p2ptest/fcsp.dbf' ; set newname for datafile '+DATA/orcl/datafile/apssp.290.929553335' to '/u01/app/oracle/oradata/p2ptest/apssp1.dbf' ; set newname for datafile '+DATA/orcl/datafile/apssp.291.929553349' to '/u01/app/oracle/oradata/p2ptest/apssp2.dbf' ; set newname for datafile '+DATA/orcl/datafile/apssp.292.929553361' to '/u01/app/oracle/oradata/p2ptest/apssp3.dbf' ; set newname for datafile '+DATA/orcl/datafile/users.293.929553605' to '/u01/app/oracle/oradata/p2ptest/users1.dbf' ; set newname for datafile '+DATA/orcl/datafile/users.294.929553637' to '/u01/app/oracle/oradata/p2ptest/users2.dbf' ; set newname for datafile '+DATA/orcl/datafile/undotbs1.977.945073401' to '/u01/app/oracle/oradata/p2ptest/undotbs2.dbf' ; restore database; switch datafile all; } 5. 基於時間點恢復遇到的問題: RMAN> RUN { SET UNTIL TIME "to_date('2017-09-11 10:53:56','yyyy-mm-dd hh24:mi:ss')"; RESTORE DATABASE; switch datafile all; RECOVER DATABASE; } executing command: SET until clause Starting restore at 07-SEP-17 using channel ORA_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 09/07/2017 14:30:48 RMAN-06026: some targets not found - aborting restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 3 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore RMAN> 6. 資料恢復: RMAN> restore database; Starting restore at 06-SEP-17 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1657 device type=DISK channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00011 to +DATAD/stdo/datafile/docsp.272.951499107 channel ORA_DISK_1: restoring datafile 00016 to +DATAD/stdo/datafile/clspidxsp.271.951499123 channel ORA_DISK_1: restoring datafile 00018 to +DATAD/stdo/datafile/clspsp.291.951498027 channel ORA_DISK_1: restoring datafile 00026 to +DATAD/stdo/datafile/apssp.282.951498727 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_34_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_34_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_34_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to +DATAD/stdo/datafile/system.270.951499139 channel ORA_DISK_1: restoring datafile 00009 to +DATAD/stdo/datafile/webp2psp.273.951499093 channel ORA_DISK_1: restoring datafile 00019 to +DATAD/stdo/datafile/clspsp.288.951498311 channel ORA_DISK_1: restoring datafile 00025 to +DATAD/stdo/datafile/apssp.281.951498803 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_35_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_35_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_35_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00004 to +DATAD/stdo/datafile/users.293.951497835 channel ORA_DISK_1: restoring datafile 00006 to +DATAD/stdo/datafile/licaisas.276.951499027 channel ORA_DISK_1: restoring datafile 00012 to +DATAD/stdo/datafile/urgesp.280.951498877 channel ORA_DISK_1: restoring datafile 00023 to +DATAD/stdo/datafile/fcsp.268.951499161 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_36_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_36_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_36_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:06 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00002 to +DATAD/stdo/datafile/sysaux.275.951499053 channel ORA_DISK_1: restoring datafile 00014 to +DATAD/stdo/datafile/salarysp.279.951498923 channel ORA_DISK_1: restoring datafile 00022 to +DATAD/stdo/datafile/fcidxsp.266.951499175 channel ORA_DISK_1: restoring datafile 00027 to +DATAD/stdo/datafile/users.292.951497931 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_37_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_37_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_37_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00008 to +DATAD/stdo/datafile/webp2pidxsp.267.951499167 channel ORA_DISK_1: restoring datafile 00028 to +DATAD/stdo/datafile/users.285.951498491 channel ORA_DISK_1: restoring datafile 00029 to +DATAD/stdo/datafile/undotbs1.713.951498407 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_38_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_38_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_38_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:55 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00005 to +DATAD/stdo/datafile/sascs.274.951499077 channel ORA_DISK_1: restoring datafile 00017 to +DATAD/stdo/datafile/clspsp.290.951498121 channel ORA_DISK_1: restoring datafile 00024 to +DATAD/stdo/datafile/apssp.283.951498651 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_39_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_39_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_39_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:55 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00003 to +DATAD/stdo/datafile/undotbs1.294.951497731 channel ORA_DISK_1: restoring datafile 00007 to +DATAD/stdo/datafile/newurgesp.277.951499003 channel ORA_DISK_1: restoring datafile 00013 to +DATAD/stdo/datafile/urgesp.278.951498967 channel ORA_DISK_1: restoring datafile 00015 to +DATAD/stdo/datafile/websp.269.951499153 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_40_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_40_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_40_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:45 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00010 to +DATAD/stdo/datafile/docidxsp.265.951499181 channel ORA_DISK_1: restoring datafile 00020 to +DATAD/stdo/datafile/clspsp.289.951498217 channel ORA_DISK_1: restoring datafile 00021 to +DATAD/stdo/datafile/clspsp.284.951498567 channel ORA_DISK_1: reading from backup piece /u01/rman/ORCL_incr0_41_20170904 channel ORA_DISK_1: errors found reading piece handle=/u01/rman/ORCL_incr0_41_20170904 channel ORA_DISK_1: failover to piece handle=/home/oracle/backup/p2p/ORCL_incr0_41_20170904 tag=DB_INCR0_BAK channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 Finished restore at 06-SEP-17 RMAN> RMAN> RMAN> 7. 恢復歸檔: 這裡要注意下在引數檔案中指定歸檔位置和redo位置轉換 RMAN> recover database; Starting recover at 07-SEP-17 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1801 device type=DISK starting media recovery channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3121 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3122 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3123 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3124 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3125 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3126 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3127 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3128 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3129 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3130 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3131 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3132 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3133 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3134 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3135 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3136 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3137 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3138 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3139 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3140 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3141 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3142 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3143 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3144 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3145 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3146 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3147 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3148 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3149 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3150 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3151 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3152 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3153 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3154 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=3155 channel ORA_DISK_1: reading from backup piece /home/oracle/backup/p2p/ORCL_arch_55_20170906 channel ORA_DISK_1: piece handle=/home/oracle/backup/p2p/ORCL_arch_55_20170906 tag=TAG20170906T164723 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 archived log file name=/home/app/oracle/oradata/arch/stdo_3121_1_929551544.arc thread=1 sequence=3121 archived log file name=/home/app/oracle/oradata/arch/stdo_3122_1_929551544.arc thread=1 sequence=3122 archived log file name=/home/app/oracle/oradata/arch/stdo_3123_1_929551544.arc thread=1 sequence=3123 archived log file name=/home/app/oracle/oradata/arch/stdo_3124_1_929551544.arc thread=1 sequence=3124 archived log file name=/home/app/oracle/oradata/arch/stdo_3125_1_929551544.arc thread=1 sequence=3125 archived log file name=/home/app/oracle/oradata/arch/stdo_3126_1_929551544.arc thread=1 sequence=3126 archived log file name=/home/app/oracle/oradata/arch/stdo_3127_1_929551544.arc thread=1 sequence=3127 archived log file name=/home/app/oracle/oradata/arch/stdo_3128_1_929551544.arc thread=1 sequence=3128 archived log file name=/home/app/oracle/oradata/arch/stdo_3129_1_929551544.arc thread=1 sequence=3129 archived log file name=/home/app/oracle/oradata/arch/stdo_3130_1_929551544.arc thread=1 sequence=3130 archived log file name=/home/app/oracle/oradata/arch/stdo_3131_1_929551544.arc thread=1 sequence=3131 archived log file name=/home/app/oracle/oradata/arch/stdo_3132_1_929551544.arc thread=1 sequence=3132 archived log file name=/home/app/oracle/oradata/arch/stdo_3133_1_929551544.arc thread=1 sequence=3133 archived log file name=/home/app/oracle/oradata/arch/stdo_3134_1_929551544.arc thread=1 sequence=3134 archived log file name=/home/app/oracle/oradata/arch/stdo_3135_1_929551544.arc thread=1 sequence=3135 archived log file name=/home/app/oracle/oradata/arch/stdo_3136_1_929551544.arc thread=1 sequence=3136 archived log file name=/home/app/oracle/oradata/arch/stdo_3137_1_929551544.arc thread=1 sequence=3137 archived log file name=/home/app/oracle/oradata/arch/stdo_3138_1_929551544.arc thread=1 sequence=3138 archived log file name=/home/app/oracle/oradata/arch/stdo_3139_1_929551544.arc thread=1 sequence=3139 archived log file name=/home/app/oracle/oradata/arch/stdo_3140_1_929551544.arc thread=1 sequence=3140 archived log file name=/home/app/oracle/oradata/arch/stdo_3141_1_929551544.arc thread=1 sequence=3141 archived log file name=/home/app/oracle/oradata/arch/stdo_3142_1_929551544.arc thread=1 sequence=3142 archived log file name=/home/app/oracle/oradata/arch/stdo_3143_1_929551544.arc thread=1 sequence=3143 archived log file name=/home/app/oracle/oradata/arch/stdo_3144_1_929551544.arc thread=1 sequence=3144 archived log file name=/home/app/oracle/oradata/arch/stdo_3145_1_929551544.arc thread=1 sequence=3145 archived log file name=/home/app/oracle/oradata/arch/stdo_3146_1_929551544.arc thread=1 sequence=3146 archived log file name=/home/app/oracle/oradata/arch/stdo_3147_1_929551544.arc thread=1 sequence=3147 archived log file name=/home/app/oracle/oradata/arch/stdo_3148_1_929551544.arc thread=1 sequence=3148 archived log file name=/home/app/oracle/oradata/arch/stdo_3149_1_929551544.arc thread=1 sequence=3149 archived log file name=/home/app/oracle/oradata/arch/stdo_3150_1_929551544.arc thread=1 sequence=3150 archived log file name=/home/app/oracle/oradata/arch/stdo_3151_1_929551544.arc thread=1 sequence=3151 archived log file name=/home/app/oracle/oradata/arch/stdo_3152_1_929551544.arc thread=1 sequence=3152 archived log file name=/home/app/oracle/oradata/arch/stdo_3153_1_929551544.arc thread=1 sequence=3153 archived log file name=/home/app/oracle/oradata/arch/stdo_3154_1_929551544.arc thread=1 sequence=3154 archived log file name=/home/app/oracle/oradata/arch/stdo_3155_1_929551544.arc thread=1 sequence=3155 unable to find archived log archived log thread=1 sequence=3156 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 09/07/2017 11:48:52 RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 3156 and starting SCN of 6738905181 RMAN> 8. 開啟資料庫: SQL> alter database open resetlogs; Database altered. SQL>