ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 单实例恢复RAC数据库步骤(二)

单实例恢复RAC数据库步骤(二)

原创 Linux操作系统 作者:yangtingkun 时间:2011-02-27 23:40:59 0 删除 编辑

简单描述在测试服务器的单机环境恢复RAC产品数据库的步骤。

这一篇介绍数据库还原过程。

单实例恢复RAC数据库步骤(一):http://yangtingkun.itpub.net/post/468/514155

 

 

下面还原数据库:

RMAN> RUN
2> {
3> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/system.260.736805807' TO '/data/oradata/orcl/system01.dbf';
4> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/undotbs1.261.736805813' TO '/data/oradata/orcl/undotbs101.dbf';
5> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/sysaux.262.736805823' TO '/data/oradata/orcl/sysaux01.dbf';
6> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/undotbs2.264.736805825' TO '/data/oradata/orcl/undotbs201.dbf';
7> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/users.265.736805835' TO '/data/oradata/orcl/users01.dbf';
8> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_acct.270.736807161' TO '/data/oradata/orcl/tsp_acct01.dbf';
9> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_back.271.736807161' TO '/data/oradata/orcl/tsp_back01.dbf';
10> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_bldbank.272.736807163' TO '/data/oradata/orcl/tsp_bldbank01.dbf';
11> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_card.273.736807163' TO '/data/oradata/orcl/tsp_card01.dbf';
12> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_comm.274.736807163' TO '/data/oradata/orcl/tsp_comm01.dbf';
13> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_econstat.275.736807165' TO '/data/oradata/orcl/tsp_econstat01.dbf';
14> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_equipment.276.736807165' TO '/data/oradata/orcl/tsp_equipment01.dbf';
15> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_evaluate.277.736807165' TO '/data/oradata/orcl/tsp_evaluate01.dbf';
16> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_exam.278.736807165' TO '/data/oradata/orcl/tsp_exam01.dbf';
17> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_hhpacs.279.736807169' TO '/data/oradata/orcl/tsp_hhpacs01.dbf';
18> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_hisaccount.280.736807171' TO '/data/oradata/orcl/tsp_hisaccount01.dbf';
19> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_infect.281.736807171' TO '/data/oradata/orcl/tsp_infect01.dbf';
20> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_info.282.736807173' TO '/data/oradata/orcl/tsp_info01.dbf';
21> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_inpadm.283.736807173' TO '/data/oradata/orcl/tsp_inpadm01.dbf';
22> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_inpbill.284.736807175' TO '/data/oradata/orcl/tsp_inpbill01.dbf';
23> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_insurance.285.736807257' TO '/data/oradata/orcl/tsp_insurance01.dbf';
24> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_interface.286.736807259' TO '/data/oradata/orcl/tsp_interface01.dbf';
25> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_lab.287.736807261' TO '/data/oradata/orcl/tsp_lab01.dbf';
26> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_material.288.736807297' TO '/data/oradata/orcl/tsp_material01.dbf';
27> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_medadm.289.736807297' TO '/data/oradata/orcl/tsp_medadm01.dbf';
28> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_medicom.290.736807299' TO '/data/oradata/orcl/tsp_medicom01.dbf';
29> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_medrec.291.736807299' TO '/data/oradata/orcl/tsp_medrec01.dbf';
30> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_ordadm.292.736807303' TO '/data/oradata/orcl/tsp_ordadm01.dbf';
31> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_outpadm.293.736807375' TO '/data/oradata/orcl/tsp_outpadm01.dbf';
32> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_outpbill.294.736807413' TO '/data/oradata/orcl/tsp_outpbill01.dbf';
33> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_pharmacy.295.736807437' TO '/data/oradata/orcl/tsp_pharmacy01.dbf';
34> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_phyexam.296.736807465' TO '/data/oradata/orcl/tsp_phyexam01.dbf';
35> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_surgery.297.736807465' TO '/data/oradata/orcl/tsp_surgery01.dbf';
36> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/tsp_temp.298.736807465' TO '/data/oradata/orcl/tsp_temp01.dbf';
37> SET NEWNAME FOR DATAFILE '+DATADG/orcl/datafile/user_data.299.736807479' TO '/data/oradata/orcl/user_data01.dbf';
38> ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
39> ALLOCATE CHANNEL C2 DEVICE TYPE DISK;
40> RESTORE DATABASE;
41> SWITCH DATAFILE ALL;
42> }

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

allocated channel: C1
channel C1: sid=1641 devtype=DISK

allocated channel: C2
channel C2: sid=1640 devtype=DISK

Starting restore at 17-JAN-11

channel C1: starting datafile backupset restore
channel C1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /data/oradata/orcl/undotbs201.dbf
restoring datafile 00010 to /data/oradata/orcl/tsp_comm01.dbf
restoring datafile 00015 to /data/oradata/orcl/tsp_hhpacs01.dbf
restoring datafile 00016 to /data/oradata/orcl/tsp_hisaccount01.dbf
restoring datafile 00019 to /data/oradata/orcl/tsp_inpadm01.dbf
restoring datafile 00021 to /data/oradata/orcl/tsp_insurance01.dbf
restoring datafile 00024 to /data/oradata/orcl/tsp_material01.dbf
restoring datafile 00025 to /data/oradata/orcl/tsp_medadm01.dbf
restoring datafile 00034 to /data/oradata/orcl/tsp_temp01.dbf
channel C1: reading from backup piece /rman/backup/orcl/5pm2aets_1_1
channel C2: starting datafile backupset restore
channel C2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /data/oradata/orcl/system01.dbf
restoring datafile 00002 to /data/oradata/orcl/undotbs101.dbf
restoring datafile 00006 to /data/oradata/orcl/tsp_acct01.dbf
restoring datafile 00009 to /data/oradata/orcl/tsp_card01.dbf
restoring datafile 00011 to /data/oradata/orcl/tsp_econstat01.dbf
restoring datafile 00013 to /data/oradata/orcl/tsp_evaluate01.dbf
restoring datafile 00014 to /data/oradata/orcl/tsp_exam01.dbf
restoring datafile 00017 to /data/oradata/orcl/tsp_infect01.dbf
restoring datafile 00035 to /data/oradata/orcl/user_data01.dbf
channel C2: reading from backup piece /rman/backup/orcl/5qm2aets_1_1
channel C1: restored backup piece 1
failover to piece handle=/data/backup/orcl/5pm2aets_1_1 tag=TAG20110117T044028
channel C1: restore complete, elapsed time: 01:18:40
channel C1: starting datafile backupset restore
channel C1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /data/oradata/orcl/sysaux01.dbf
restoring datafile 00007 to /data/oradata/orcl/tsp_back01.dbf
restoring datafile 00008 to /data/oradata/orcl/tsp_bldbank01.dbf
restoring datafile 00012 to /data/oradata/orcl/tsp_equipment01.dbf
restoring datafile 00020 to /data/oradata/orcl/tsp_inpbill01.dbf
restoring datafile 00022 to /data/oradata/orcl/tsp_interface01.dbf
restoring datafile 00023 to /data/oradata/orcl/tsp_lab01.dbf
restoring datafile 00027 to /data/oradata/orcl/tsp_medrec01.dbf
restoring datafile 00030 to /data/oradata/orcl/tsp_outpbill01.dbf
restoring datafile 00032 to /data/oradata/orcl/tsp_phyexam01.dbf
channel C1: reading from backup piece /rman/backup/orcl/5sm2aev4_1_1
channel C2: restored backup piece 1
failover to piece handle=/data/backup/orcl/5qm2aets_1_1 tag=TAG20110117T044028
channel C2: restore complete, elapsed time: 01:19:36
channel C2: starting datafile backupset restore
channel C2: specifying datafile(s) to restore from backup set
restoring datafile 00005 to /data/oradata/orcl/users01.dbf
restoring datafile 00018 to /data/oradata/orcl/tsp_info01.dbf
restoring datafile 00026 to /data/oradata/orcl/tsp_medicom01.dbf
restoring datafile 00028 to /data/oradata/orcl/tsp_ordadm01.dbf
restoring datafile 00029 to /data/oradata/orcl/tsp_outpadm01.dbf
restoring datafile 00031 to /data/oradata/orcl/tsp_pharmacy01.dbf
restoring datafile 00033 to /data/oradata/orcl/tsp_surgery01.dbf
channel C2: reading from backup piece /rman/backup/orcl/5rm2aeub_1_1
channel C1: restored backup piece 1
failover to piece handle=/data/backup/orcl/5sm2aev4_1_1 tag=TAG20110117T044028
channel C1: restore complete, elapsed time: 01:21:55
channel C2: restored backup piece 1
failover to piece handle=/data/backup/orcl/5rm2aeub_1_1 tag=TAG20110117T044028
channel C2: restore complete, elapsed time: 01:22:05
Finished restore at 17-JAN-11

datafile 1 switched to datafile copy
input datafile copy recid=141 stamp=740678272 filename=/data/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=142 stamp=740678272 filename=/data/oradata/orcl/undotbs101.dbf
datafile 3 switched to datafile copy
input datafile copy recid=143 stamp=740678272 filename=/data/oradata/orcl/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=144 stamp=740678272 filename=/data/oradata/orcl/undotbs201.dbf
datafile 5 switched to datafile copy
input datafile copy recid=145 stamp=740678273 filename=/data/oradata/orcl/users01.dbf
datafile 6 switched to datafile copy
input datafile copy recid=146 stamp=740678273 filename=/data/oradata/orcl/tsp_acct01.dbf
datafile 7 switched to datafile copy
input datafile copy recid=147 stamp=740678273 filename=/data/oradata/orcl/tsp_back01.dbf
datafile 8 switched to datafile copy
input datafile copy recid=148 stamp=740678273 filename=/data/oradata/orcl/tsp_bldbank01.dbf
datafile 9 switched to datafile copy
input datafile copy recid=149 stamp=740678273 filename=/data/oradata/orcl/tsp_card01.dbf
datafile 10 switched to datafile copy
input datafile copy recid=150 stamp=740678273 filename=/data/oradata/orcl/tsp_comm01.dbf
datafile 11 switched to datafile copy
input datafile copy recid=151 stamp=740678273 filename=/data/oradata/orcl/tsp_econstat01.dbf
datafile 12 switched to datafile copy
input datafile copy recid=152 stamp=740678273 filename=/data/oradata/orcl/tsp_equipment01.dbf
datafile 13 switched to datafile copy
input datafile copy recid=153 stamp=740678273 filename=/data/oradata/orcl/tsp_evaluate01.dbf
datafile 14 switched to datafile copy
input datafile copy recid=154 stamp=740678273 filename=/data/oradata/orcl/tsp_exam01.dbf
datafile 15 switched to datafile copy
input datafile copy recid=155 stamp=740678273 filename=/data/oradata/orcl/tsp_hhpacs01.dbf
datafile 16 switched to datafile copy
input datafile copy recid=156 stamp=740678273 filename=/data/oradata/orcl/tsp_hisaccount01.dbf
datafile 17 switched to datafile copy
input datafile copy recid=157 stamp=740678273 filename=/data/oradata/orcl/tsp_infect01.dbf
datafile 18 switched to datafile copy
input datafile copy recid=158 stamp=740678273 filename=/data/oradata/orcl/tsp_info01.dbf
datafile 19 switched to datafile copy
input datafile copy recid=159 stamp=740678273 filename=/data/oradata/orcl/tsp_inpadm01.dbf
datafile 20 switched to datafile copy
input datafile copy recid=160 stamp=740678273 filename=/data/oradata/orcl/tsp_inpbill01.dbf
datafile 21 switched to datafile copy
input datafile copy recid=161 stamp=740678274 filename=/data/oradata/orcl/tsp_insurance01.dbf
datafile 22 switched to datafile copy
input datafile copy recid=162 stamp=740678274 filename=/data/oradata/orcl/tsp_interface01.dbf
datafile 23 switched to datafile copy
input datafile copy recid=163 stamp=740678274 filename=/data/oradata/orcl/tsp_lab01.dbf
datafile 24 switched to datafile copy
input datafile copy recid=164 stamp=740678274 filename=/data/oradata/orcl/tsp_material01.dbf
datafile 25 switched to datafile copy
input datafile copy recid=165 stamp=740678274 filename=/data/oradata/orcl/tsp_medadm01.dbf
datafile 26 switched to datafile copy
input datafile copy recid=166 stamp=740678274 filename=/data/oradata/orcl/tsp_medicom01.dbf
datafile 27 switched to datafile copy
input datafile copy recid=167 stamp=740678274 filename=/data/oradata/orcl/tsp_medrec01.dbf
datafile 28 switched to datafile copy
input datafile copy recid=168 stamp=740678274 filename=/data/oradata/orcl/tsp_ordadm01.dbf
datafile 29 switched to datafile copy
input datafile copy recid=169 stamp=740678274 filename=/data/oradata/orcl/tsp_outpadm01.dbf
datafile 30 switched to datafile copy
input datafile copy recid=170 stamp=740678274 filename=/data/oradata/orcl/tsp_outpbill01.dbf
datafile 31 switched to datafile copy
input datafile copy recid=171 stamp=740678274 filename=/data/oradata/orcl/tsp_pharmacy01.dbf
datafile 32 switched to datafile copy
input datafile copy recid=172 stamp=740678274 filename=/data/oradata/orcl/tsp_phyexam01.dbf
datafile 33 switched to datafile copy
input datafile copy recid=173 stamp=740678274 filename=/data/oradata/orcl/tsp_surgery01.dbf
datafile 34 switched to datafile copy
input datafile copy recid=174 stamp=740678274 filename=/data/oradata/orcl/tsp_temp01.dbf
datafile 35 switched to datafile copy
input datafile copy recid=175 stamp=740678275 filename=/data/oradata/orcl/user_data01.dbf
released channel: C1
released channel: C2

RMAN> exit


Recovery Manager complete.

至此数据库还原操作完成,主要的工作量在于产生SET NEWNAME脚本,至于命令的执行到是很顺利。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-688057/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10524851