NBU备份rac恢复到single

 
  

1. 根据生产spfile,创建恢复数据库pfile

2.       *.audit_file_dest='/u01/app8/oracle/admin/zjyw/adump'

3.       *.audit_trail='NONE'

4.       *.cluster_database=false

5.       *.compatible='11.2.0.4.0'

6.       *.control_files='/orabak_data1/zjyw38/controlfile/control01..ctl'

7.       *.db_block_size=8192

8.       *.db_create_file_dest='/orabak_data1/zjyw38/datafile/'

9.       *.db_domain=''

10.   *.db_name='zjyw'

11.   *.diagnostic_dest='/u01/app8/oracle'

12.   *.dispatchers='(PROTOCOL=TCP) (SERVICE=zjywXDB)'

13.   *.event='10298 trace name context forever,level 32'

14.   *.instance_number=1

15.   *.log_archive_dest_1='LOCATION='/orabak_data1/zjyw38/arch'

16.   *.log_archive_format='%t_%s_%r.arch'

17.   *.memory_target=17436770304

18.   *.open_cursors=2000

19.   *.pga_aggregate_target=4294967296

20.   *.processes=2000

21.   *.remote_login_passwordfile='exclusive'

22.   *.sessions=1655

23.   *.undo_tablespace='UNDOTBS1'

2.启动数据库到nomont并恢复控制文件

从NBU备份里面恢复出日期为2017-03-06 的控制文件

 

RMAN> run {

2> allocate channel ch1 type 'SBT_TAPE';

3> send 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=kaafa0db003r_nbu';

4> restore controlfile from '/cntrl_ZJYW_20170306_32729_upruebe4_1_1';

5> release channel ch1;

6> }

 

using target database control file instead of recovery catalog

allocated channel: ch1

channel ch1: SID=2270 device type=SBT_TAPE

channel ch1: Veritas NetBackup for Oracle - Release 7.6 (2014102802)

 

sent command to channel: ch1

 

Starting restore at 2017-03-08 15:48:20

 

channel ch1: restoring control file

channel ch1: restore complete, elapsed time: 00:01:25

output file name=/orabak_data1/zjyw38/controlfile/control01..ctl

Finished restore at 2017-03-08 15:49:46

 

released channel: ch1

 

 

 

 

 

3.将数据库起到mount,并restore数据库

 

     

run {

allocate  channel ch1 type 'SBT_TAPE';

allocate  channel ch2 type 'SBT_TAPE';

allocate  channel ch3 type 'SBT_TAPE';

allocate  channel ch4 type 'SBT_TAPE';

allocate  channel ch5 type 'SBT_TAPE';

allocate  channel ch6 type 'SBT_TAPE';

allocate  channel ch7 type 'SBT_TAPE';

allocate  channel ch8 type 'SBT_TAPE';

send 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=kaafa0db003r_nbu';

set newname for datafile 1   to    '/orabak_data1/zjyw38/datafile/system.463.929198409';

set newname for datafile 2   to    '/orabak_data1/zjyw38/datafile/sysaux.285.929205129';

set newname for datafile 3   to    '/orabak_data1/zjyw38/datafile/undotbs1.350.929202661';

set newname for datafile 4   to    '/orabak_data1/zjyw38/datafile/undotbs2.349.929202661';

set newname for datafile 5   to    '/orabak_data1/zjyw38/datafile/users.290.929205043 ';

set newname for datafile 6   to    '/orabak_data1/zjyw38/datafile/afadata.439.929199071 ';

set newname for datafile 7   to    '/orabak_data1/zjyw38/datafile/lcdata.438.929199079';

set newname for datafile 8   to    '/orabak_data1/zjyw38/datafile/dsdfdata.445.929198065';

set newname for datafile 9   to    '/orabak_data1/zjyw38/datafile/xnbdata_fz.313.929204251';

set newname for datafile 10  to    '/orabak_data1/zjyw38/datafile/xnbdata_xm.308.929204389';

set newname for datafile 11  to    '/orabak_data1/zjyw38/datafile/xnbdata_pt.303.929204413';

set newname for datafile 12  to    '/orabak_data1/zjyw38/datafile/xnbdata_sm.293.929205007';

set newname for datafile 13  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.298.929204949';

set newname for datafile 14  to    '/orabak_data1/zjyw38/datafile/xnbdata_zz.328.929203547';

set newname for datafile 15  to    '/orabak_data1/zjyw38/datafile/xnbdata_np.339.929203363';

set newname for datafile 16  to    '/orabak_data1/zjyw38/datafile/xnbdata_nd.334.929203407';

set newname for datafile 17  to    '/orabak_data1/zjyw38/datafile/xnbdata_ly.319.929204207';

set newname for datafile 18  to    '/orabak_data1/zjyw38/datafile/xnbdata_fz.283.929205133';

set newname for datafile 19  to    '/orabak_data1/zjyw38/datafile/xnbdata_fz.288.929205047';

set newname for datafile 20  to    '/orabak_data1/zjyw38/datafile/dsdfdata.384.929200957';

set newname for datafile 21  to    '/orabak_data1/zjyw38/datafile/xnbdata_np.391.929200945';

set newname for datafile 22  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.390.929200947';

set newname for datafile 23  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.282.929205133';

set newname for datafile 24  to    '/orabak_data1/zjyw38/datafile/dsdfdata.287.929205049';

set newname for datafile 25  to    '/orabak_data1/zjyw38/datafile/dsdfdata.417.929200065';

set newname for datafile 26  to    '/orabak_data1/zjyw38/datafile/dsdfdata.412.929200073';

set newname for datafile 27  to    '/orabak_data1/zjyw38/datafile/dsdfdata.408.929200079';

set newname for datafile 28  to    '/orabak_data1/zjyw38/datafile/dsdfdata.403.929200299';

set newname for datafile 29  to    '/orabak_data1/zjyw38/datafile/dsdfdata.398.929200935';

set newname for datafile 30  to    '/orabak_data1/zjyw38/datafile/dsdfdata.325.929203549';

set newname for datafile 31  to    '/orabak_data1/zjyw38/datafile/dsdfdata.312.929204253';

set newname for datafile 32  to    '/orabak_data1/zjyw38/datafile/dsdfdata.307.929204391';

set newname for datafile 33  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.302.929204415';

set newname for datafile 34  to    '/orabak_data1/zjyw38/datafile/dsdfdata.292.929205009';

set newname for datafile 35  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.297.929204951';

set newname for datafile 36  to    '/orabak_data1/zjyw38/datafile/dsdfdata.326.929203549';

set newname for datafile 37  to    '/orabak_data1/zjyw38/datafile/dsdfdata.338.929203365';

set newname for datafile 38  to    '/orabak_data1/zjyw38/datafile/xnbdata_nd.333.929203409';

set newname for datafile 39  to    '/orabak_data1/zjyw38/datafile/xnbdata_ly.318.929204209';

set newname for datafile 40  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.345.929202673';

set newname for datafile 41  to    '/orabak_data1/zjyw38/datafile/xnbidx_pt.430.929199093 ';

set newname for datafile 42  to    '/orabak_data1/zjyw38/datafile/xnbidx_xm.426.929199097 ';

set newname for datafile 43  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.346.929202673 ';

set newname for datafile 44  to    '/orabak_data1/zjyw38/datafile/xnbidx_sm.358.929202549 ';

set newname for datafile 45  to    '/orabak_data1/zjyw38/datafile/xnbidx_np.353.929202563 ';

set newname for datafile 46  to    '/orabak_data1/zjyw38/datafile/xnbidx_nd.368.929201795 ';

set newname for datafile 47  to    '/orabak_data1/zjyw38/datafile/xnbidx_zz.363.929201803 ';

set newname for datafile 48  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.378.929201705 ';

set newname for datafile 49  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.373.929201729 ';

set newname for datafile 50  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.383.929200959 ';

set newname for datafile 51  to    '/orabak_data1/zjyw38/datafile/xnbidx_ly.444.929198691 ';

set newname for datafile 52  to    '/orabak_data1/zjyw38/datafile/xnbidx_np.321.929203555 ';

set newname for datafile 53  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.454.929198095 ';

set newname for datafile 54  to    '/orabak_data1/zjyw38/datafile/xnbdata_np.437.929199081';

set newname for datafile 55  to    '/orabak_data1/zjyw38/datafile/xnbidx_nd.389.929200947 ';

set newname for datafile 56  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.388.929200949 ';

set newname for datafile 57  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.281.929205135 ';

set newname for datafile 58  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.286.929205049';

set newname for datafile 59  to    '/orabak_data1/zjyw38/datafile/xnbidx_ly.464.929198411 ';

set newname for datafile 60  to    '/orabak_data1/zjyw38/datafile/xnbdata_nd.416.929200067';

set newname for datafile 61  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.411.929200075';

set newname for datafile 62  to    '/orabak_data1/zjyw38/datafile/sysaux.315.929204249';

set newname for datafile 63  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.424.929199563 ';

set newname for datafile 64  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.458.929198093 ';

set newname for datafile 65  to    '/orabak_data1/zjyw38/datafile/xnbidx_np.322.929203555 ';

set newname for datafile 66  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.407.929200081';

set newname for datafile 67  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.402.929200301 ';

set newname for datafile 68  to    '/orabak_data1/zjyw38/datafile/xnbdata_fz.397.929200935';

set newname for datafile 69  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.336.929203367 ';

set newname for datafile 70  to    '/orabak_data1/zjyw38/datafile/xnbdata_zz.323.929203551';

set newname for datafile 71  to    '/orabak_data1/zjyw38/datafile/xnbidx_ly.331.929203411 ';

set newname for datafile 72  to    '/orabak_data1/zjyw38/datafile/xnbdata_ly.311.929204255';

set newname for datafile 73  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.306.929204391';

set newname for datafile 74  to    '/orabak_data1/zjyw38/datafile/xnbidx_nd.316.929204211 ';

set newname for datafile 75  to    '/orabak_data1/zjyw38/datafile/xnbidx_np.301.929204417 ';

set newname for datafile 76  to    '/orabak_data1/zjyw38/datafile/xnbdata_nd.291.929205009';

set newname for datafile 77  to    '/orabak_data1/zjyw38/datafile/xnbidx_zz.341.929202679 ';

set newname for datafile 78  to    '/orabak_data1/zjyw38/datafile/dsdfdata.296.929204951';

set newname for datafile 79  to    '/orabak_data1/zjyw38/datafile/xnbidx_fz.324.929203551 ';

set newname for datafile 80  to    '/orabak_data1/zjyw38/datafile/xnbdata_np.337.929203365';

set newname for datafile 81  to    '/orabak_data1/zjyw38/datafile/dsdfdata.332.929203409';

set newname for datafile 82  to    '/orabak_data1/zjyw38/datafile/xnbidx_nd.342.929202677 ';

set newname for datafile 83  to    '/orabak_data1/zjyw38/datafile/cussrvdata.317.929204211';

set newname for datafile 84  to    '/orabak_data1/zjyw38/datafile/cussrvdata.356.929202551';

set newname for datafile 85  to    '/orabak_data1/zjyw38/datafile/xnbidx_ly.351.929202565 ';

set newname for datafile 86  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.343.929202677 ';

set newname for datafile 87  to    '/orabak_data1/zjyw38/datafile/undotbs1.380.929201699';

set newname for datafile 88  to    '/orabak_data1/zjyw38/datafile/undotbs2.375.929201725';

set newname for datafile 89  to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.344.929202675';

set newname for datafile 90  to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.357.929202549';

set newname for datafile 91  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.352.929202565';

set newname for datafile 92  to    '/orabak_data1/zjyw38/datafile/xnbidx_nd.365.929201799 ';

set newname for datafile 93  to    '/orabak_data1/zjyw38/datafile/xnbidx_zz.361.929201805 ';

set newname for datafile 94  to    '/orabak_data1/zjyw38/datafile/trade_appprofiles_data.376.929201707';

set newname for datafile 95  to    '/orabak_data1/zjyw38/datafile/trade_appprofiles_data.371.929201731';

set newname for datafile 96  to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.366.929201797';

set newname for datafile 97  to    '/orabak_data1/zjyw38/datafile/dsdfdata.362.929201805';

set newname for datafile 98  to    '/orabak_data1/zjyw38/datafile/xnbidx_qz.377.929201707 ';

set newname for datafile 99  to    '/orabak_data1/zjyw38/datafile/xnbdata_qz.372.929201731';

set newname for datafile 100 to    '/orabak_data1/zjyw38/datafile/dsdfdata.382.929200959';

set newname for datafile 101 to    '/orabak_data1/zjyw38/datafile/xnbdata_nd.443.929198691';

set newname for datafile 102 to    '/orabak_data1/zjyw38/datafile/sign_data.381.929200961 ';

set newname for datafile 103 to    '/orabak_data1/zjyw38/datafile/stable_data.441.929198693 ';

set newname for datafile 104 to    '/orabak_data1/zjyw38/datafile/event_data.310.929204385';

set newname for datafile 105 to    '/orabak_data1/zjyw38/datafile/idx_sign_data.433.929199089 ';

set newname for datafile 106 to    '/orabak_data1/zjyw38/datafile/idx_stable_data.459.929198097 ';

set newname for datafile 107 to    '/orabak_data1/zjyw38/datafile/idx_event_data.465.929198411';

set newname for datafile 108 to    '/orabak_data1/zjyw38/datafile/afadata.436.929199083 ';

set newname for datafile 109 to    '/orabak_data1/zjyw38/datafile/afadata.387.929200949 ';

set newname for datafile 110 to    '/orabak_data1/zjyw38/datafile/afadata.386.929200951 ';

set newname for datafile 111 to    '/orabak_data1/zjyw38/datafile/afadata.414.929200069 ';

set newname for datafile 112 to    '/orabak_data1/zjyw38/datafile/afadata.410.929200077 ';

set newname for datafile 113 to    '/orabak_data1/zjyw38/datafile/dsdfdata.406.929200081';

set newname for datafile 114 to    '/orabak_data1/zjyw38/datafile/afadata.401.929200301 ';

set newname for datafile 115 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.435.929199087';

set newname for datafile 116 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.451.929198093';

set newname for datafile 117 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.448.929198087';

set newname for datafile 118 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.449.929198089';

set newname for datafile 119 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.456.929198095';

set newname for datafile 120 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.422.929199563';

set newname for datafile 121 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.432.929199091';

set newname for datafile 122 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.428.929199095';

set newname for datafile 123 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.421.929199563';

set newname for datafile 124 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.431.929199093';

set newname for datafile 125 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.427.929199095';

set newname for datafile 126 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.257.929198411';

set newname for datafile 127 to    '/orabak_data1/zjyw38/datafile/afadata.370.929201789 ';

set newname for datafile 128 to    '/orabak_data1/zjyw38/datafile/sign_data.460.929198097 ';

set newname for datafile 129 to    '/orabak_data1/zjyw38/datafile/sign_data.457.929198093 ';

set newname for datafile 130 to    '/orabak_data1/zjyw38/datafile/sign_data.453.929198095 ';

set newname for datafile 131 to    '/orabak_data1/zjyw38/datafile/sign_data.455.929198095 ';

set newname for datafile 132 to    '/orabak_data1/zjyw38/datafile/idx_sign_data.461.929198099 ';

set newname for datafile 133 to    '/orabak_data1/zjyw38/datafile/event_data.314.929204249';

set newname for datafile 134 to    '/orabak_data1/zjyw38/datafile/sign_data.309.929204387 ';

set newname for datafile 135 to    '/orabak_data1/zjyw38/datafile/stable_data.304.929204411 ';

set newname for datafile 136 to    '/orabak_data1/zjyw38/datafile/idx_event_data.442.929198693';

set newname for datafile 137 to    '/orabak_data1/zjyw38/datafile/idx_sign_data.396.929200937 ';

set newname for datafile 138 to    '/orabak_data1/zjyw38/datafile/idx_stable_data.423.929199563 ';

set newname for datafile 139 to    '/orabak_data1/zjyw38/datafile/afadata.347.929202669 ';

set newname for datafile 140 to    '/orabak_data1/zjyw38/datafile/afadata.369.929201793 ';

set newname for datafile 141 to    '/orabak_data1/zjyw38/datafile/afadata.367.929201795 ';

set newname for datafile 142 to    '/orabak_data1/zjyw38/datafile/event_data.360.929202543';

set newname for datafile 143 to    '/orabak_data1/zjyw38/datafile/event_data.355.929202557';

set newname for datafile 144 to    '/orabak_data1/zjyw38/datafile/idx_event_data.359.929202547';

set newname for datafile 145 to    '/orabak_data1/zjyw38/datafile/idx_event_data.354.929202561';

set newname for datafile 146 to    '/orabak_data1/zjyw38/datafile/idx_event_data.379.929201703';

set newname for datafile 147 to    '/orabak_data1/zjyw38/datafile/event_data.374.929201727';

set newname for datafile 148 to    '/orabak_data1/zjyw38/datafile/afadata.294.929205005 ';

set newname for datafile 149 to    '/orabak_data1/zjyw38/datafile/afadata.299.929204947 ';

set newname for datafile 150 to    '/orabak_data1/zjyw38/datafile/afadata.393.929200941 ';

set newname for datafile 151 to    '/orabak_data1/zjyw38/datafile/afadata.330.929203537 ';

set newname for datafile 152 to    '/orabak_data1/zjyw38/datafile/event_data.392.929200943';

set newname for datafile 153 to    '/orabak_data1/zjyw38/datafile/event_data.348.929202669';

set newname for datafile 154 to    '/orabak_data1/zjyw38/datafile/event_data.364.929201801';

set newname for datafile 155 to    '/orabak_data1/zjyw38/datafile/event_data.340.929203359';

set newname for datafile 156 to    '/orabak_data1/zjyw38/datafile/event_data.335.929203403';

set newname for datafile 157 to    '/orabak_data1/zjyw38/datafile/idx_event_data.320.929204203';

set newname for datafile 158 to    '/orabak_data1/zjyw38/datafile/event_data.400.929200929';

set newname for datafile 159 to    '/orabak_data1/zjyw38/datafile/dsdfdata.329.929203539';

set newname for datafile 160 to    '/orabak_data1/zjyw38/datafile/afadata.418.929200063 ';

set newname for datafile 161 to    '/orabak_data1/zjyw38/datafile/event_data.415.929200069';

set newname for datafile 162 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.434.929199089';

set newname for datafile 163 to    '/orabak_data1/zjyw38/datafile/idx_event_data.429.929199095';

set newname for datafile 164 to    '/orabak_data1/zjyw38/datafile/afadata.399.929200933 ';

set newname for datafile 165 to    '/orabak_data1/zjyw38/datafile/event_data.327.929203547';

set newname for datafile 166 to    '/orabak_data1/zjyw38/datafile/event_data.420.929200059';

set newname for datafile 167 to    '/orabak_data1/zjyw38/datafile/idx_event_data.305.929204409';

set newname for datafile 168 to    '/orabak_data1/zjyw38/datafile/afadata.419.929200063 ';

set newname for datafile 169 to    '/orabak_data1/zjyw38/datafile/event_data.295.929205003';

set newname for datafile 170 to    '/orabak_data1/zjyw38/datafile/dsdfdata.300.929204945';

set newname for datafile 171 to    '/orabak_data1/zjyw38/datafile/idx_event_data.409.929200077';

set newname for datafile 172 to    '/orabak_data1/zjyw38/datafile/event_data.404.929200297';

set newname for datafile 173 to    '/orabak_data1/zjyw38/datafile/event_data.452.929198685';

set newname for datafile 174 to    '/orabak_data1/zjyw38/datafile/afadata.440.929199071 ';

set newname for datafile 175 to    '/orabak_data1/zjyw38/datafile/idx_event_data.385.929200953';

set newname for datafile 176 to    '/orabak_data1/zjyw38/datafile/dsdfdata.395.929200937';

set newname for datafile 177 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.394.929200937';

set newname for datafile 178 to    '/orabak_data1/zjyw38/datafile/event_data.447.929198067';

set newname for datafile 179 to    '/orabak_data1/zjyw38/datafile/dsdfdata.462.929198403';

set newname for datafile 180 to    '/orabak_data1/zjyw38/datafile/afadata.413.929200069 ';

set newname for datafile 181 to    '/orabak_data1/zjyw38/datafile/idx_sign_data.450.929198091 ';

set newname for datafile 182 to    '/orabak_data1/zjyw38/datafile/event_data.425.929199555';

set newname for datafile 183 to    '/orabak_data1/zjyw38/datafile/idx_event_data.284.929205131';

set newname for datafile 184 to    '/orabak_data1/zjyw38/datafile/dsdfdata.466.929198065';

set newname for datafile 185 to    '/orabak_data1/zjyw38/datafile/event_data.446.929198067';

set newname for datafile 186 to    '/orabak_data1/zjyw38/datafile/dsdf_idx_tbs.289.929205045';

set newname for datafile 187 to    '/orabak_data1/zjyw38/datafile/idx_event_data.405.929200295';

set newname for datafile 188 to    '/orabak_data1/zjyw38/datafile/idx_event_data.467.930089741';

set newname for tempfile 1   to    '/orabak_data1/zjyw38/datafile/temp.272.929232755';

set newname for tempfile 2   to    '/orabak_data1/zjyw38/datafile/afatmp.271.929232757';

set newname for tempfile 3   to    '/orabak_data1/zjyw38/datafile/lctmp.270.929232759';

set newname for tempfile 4   to    '/orabak_data1/zjyw38/datafile/dsdftmp.267.929232765';

set newname for tempfile 5   to    '/orabak_data1/zjyw38/datafile/dsdftmp.268.929232763';

set newname for tempfile 6   to    '/orabak_data1/zjyw38/datafile/dsdftmp.269.929232763';

set newname for tempfile 7   to    '/orabak_data1/zjyw38/datafile/signtmp.266.929232767';

set newname for tempfile 8   to    '/orabak_data1/zjyw38/datafile/stabletmp.265.929232767';

set newname for tempfile 9   to    '/orabak_data1/zjyw38/datafile/eventtmp.262.929232769';

set newname for tempfile 10  to    '/orabak_data1/zjyw38/datafile/idx_signtmp.261.929232769';

set newname for tempfile 11  to    '/orabak_data1/zjyw38/datafile/idx_stabletmp.260.929232771';

set newname for tempfile 12  to    '/orabak_data1/zjyw38/datafile/idx_eventtmp.259.929232771';

set newname for tempfile 13  to    '/orabak_data1/zjyw38/datafile/eventtmp.263.929232769';

set newname for tempfile 14  to    '/orabak_data1/zjyw38/datafile/eventtmp.264.929232767';

restore database;

switch datafile all;

switch tempfile all;

release channel ch1;

release channel ch2;

release channel ch3;

release channel ch4;

release channel ch5;

release channel ch6;

release channel ch7;

release channel ch8;

}

 

 

4.recover database,.并数据库起到open,

run{

allocate  channel ch1 type 'SBT_TAPE';

allocate  channel ch2 type 'SBT_TAPE';

send 'NB_ORA_SERV=nbuserver,NB_ORA_CLIENT=kaafa0db003r_nbu';

set archivelog destination to '/orabak_data1/zjyw38/arch';

restore archivelog from sequence 485 thread 1;

restore archivelog from sequence 430 thread 2;

set until sequence 430 thread 2;

recover database;

release channel ch1;

release channel ch2;

}

 

recover database;

alter database open resetlogs;

 

查询thread= 2,sequence =430的恢复时间

>select a.first_time,a.next_time from gv$archived_log a where a.sequence#='430'  and a.thread#='2';

1       2017/3/5 11:51:13    |  2017/3/6 6:45:32

2       2017/3/5 11:51:13   |  2017/3/6 6:45:32

即恢复的时间点是2017-03-06  6:45:32

 

 5.修改相应undo、 redo  thread 

 

你可能感兴趣的:(oracle)