BrtoolsRman 恢复操作手册

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
查看archHE5.log日志文件里从2008-08-26~2008-08-29的scn号,如:126012~126015
GVSHE503:orahe5 29> more /oracle/HE5/saparch/archHE5.log
#
#
#
#
#
检查achivelog是否完全恢复,如果发现中间有一段scn的日志未恢复,如:2 136163-136168没找到。则采用如下命令恢复:
Brtools +Rman恢复操作手册
1、恢复场景
1.备份过程
(1)2008-8-26日对ECC GVSHE502数据库做了一次全备份,之后采用备份archive
(2)2008-8-27日对ECC GVSHE502数据库新增若干表空间。
(3)2008-8-27~28日对ECC GVSHE502数据库做reorg动作(mv table and rebuild index)
'/oracle/HE5/origlogA/log_g25m1.dbf',
'/oracle/HE5/mirrlogA/log_g25m2.dbf'
) SIZE 300M,
GROUP 26 (
'/oracle/HE5/origlogB/log_g26m1.dbf',
'/oracle/HE5/mirrlogB/log_g26m2.dbf'
201,211,10,20,171,85,181,192,202,212,11,21,172,86,182,193,203,213,22,12,
173,174,163,183,194,204,214,13,23,57,109,69,90,123,142,152,27,42,58,110,
70,91,124,137,153,28,43,96,111,154,71,29,44,97,112,155,45,30,98,113,
165,175,78,184,195,205,4,14,176,79,166,185,196,206,5,15,177,80,186,167,
197,207,6,16,178,81,187,198,168,208,7,17,56,107,68,89,122,225,136,26,
41,82,179,189,199,209,169,8,18,83,180,190,200,210,9,170,19,84,188,191,
'/oracle/HE5/mirrlogB/log_g28m2.dbf'
) SIZE 300M
-- STANDBY LOGFILE
DATAFILE
'/oracle/HE5/sapdata6/system_1/system.data1',
'/oracle/HE5/sapdata6/undo_1/undo.data1',
'/oracle/HE5/sapdata17/sr3_62/sr3.data62',
'/oracle/HE5/sapdata18/sr3_63/sr3.data63',
'/oracle/HE5/sapdata19/sr3_64/sr3.data64',
'/oracle/HE5/sapdata20/sr3_65/sr3.data65',
GVSHE503:orahe5>brrestore -d util_file -b2 "#NULL" -m /oracle/HE5/sapbackup/bdyrdovw.fnr
4.根据.fnr文件内容,恢复control file
GVSHE503:orahe5>brrestore -b /oracle/HE5/sapbackup/bdyrdovw.fnr -m 0
'/oracle/HE5/sapdata19/sr3_54/sr3.data54',
'/oracle/HE5/sapdata20/sr3_55/sr3.data55',
'/oracle/HE5/sapdata21/sr3_56/sr3.data56',
'/oracle/HE5/sapdata22/sr3_57/sr3.data57',
) SIZE 300M,
GROUP 27 (
'/oracle/HE5/origlogA/log_g27m1.dbf',
'/oracle/HE5/mirrlogA/log_g27m2.dbf'
) SIZE 300M,
Gห้องสมุดไป่ตู้OUP 28 (
'/oracle/HE5/origlogB/log_g28m1.dbf',
92,138,125,156,143,31,46,99,114,93,126,139,144,157,32,47,100,115,94,127,
140,145,158,33,48,215,216,217,218,219,220,221,222,223,224,161,2,151,64,63,
1,60,61,62,50,65,59,87,66,3,108,24,164 from tag bdyrdovw force;
brrestore -p initHE5.sap –a2 136163-136168 -d util_file -r /oracle/HE5/102_64/dbs/initHE5.utl -k no -l E -i 30'
8.(此步是在两个数据库是不同的实例时需要,如备份库instance:HE5,而要恢复的数据库instance:H3,则需要此步骤,否则,跳过此步骤)参照2008-8-28 09:00:00以后备份的controlfile trace重建controlfile
/oracle/HE5/origlogA/cntrl/cntlrHE5.dbf NO 16384 942
/oracle/HE5/origlogB/cntrl/cntrlHE5.dbf NO 16384 942
注意:记住controlfile路径及其文件名,在执行前如果以前有controlfile,请把以前的controlfile重名其他文件。
'/oracle/HE5/sapdata23/sr3_58/sr3.data58',
'/oracle/HE5/sapdata24/sr3_59/sr3.data59',
'/oracle/HE5/sapdata25/sr3_60/sr3.data60',
'/oracle/HE5/sapdata16/sr3_61/sr3.data61',
'/oracle/HE5/sapdata6/sysaux_1/sysaux.data1',
'/oracle/HE5/sapdata16/sr3_51/sr3.data51',
'/oracle/HE5/sapdata17/sr3_52/sr3.data52',
'/oracle/HE5/sapdata18/sr3_53/sr3.data53',
(4)2008-8-28日下午,对ECC GVSHE502数据库做增量备份
2.恢复要求
(1)从备份磁带库中恢复
(2)恢复到ECC GVSHE502数据库到2008-8-28 9:00:00
2、恢复过程
1.关闭GVSHE503数据库linstner和intance
GVSHE503:orahe5>lsnrctl stop
GVSHE503:orahe5>sqlplus ‘/as sysdba’
sql>shutdown immediate;
2.恢复备份日志
GVSHE503:orahe5>brrestore -d util_file -b2 "#NULL" -m /oracle/HE5/sapbackup/backHE5.log
parms 'BLKSIZE=65536 ENV=(XINT_PROFILE=/oracle/HE5/102_64/dbs/initHE5.utl,PROLE_PORT=57323)';
restore datafile 230,231,233,232,238,239,229,240,241,242,243,244,234,235,236,237,245,246,247,248,
release channel sbt_1;
release channel sbt_2; }
7.恢复归档日志至2008-08-28 09:00:00
GVSHE503:orahe5 21>brrestore -d util_file -b2 "#NULL" -m /oracle/HE5/saparch/archHE5.log
'/oracle/HE5/mirrlogA/log_g23m2.dbf'
) SIZE 300M,
GROUP 24 (
'/oracle/HE5/origlogB/log_g24m1.dbf',
'/oracle/HE5/mirrlogB/log_g24m2.dbf'
) SIZE 300M,
GROUP 25 (
'/oracle/HE5/sapdata21/sr3_66/sr3.data66',
249,250,251,252,253,67,88,121,141,159,226,25,40,101,116,72,95,146,34,35,
49,102,117,73,119,128,131,147,51,103,118,74,120,129,132,36,52,104,75,130,
133,148,160,37,53,105,76,134,149,162,227,38,54,55,106,77,135,228,150,39,
MAXLOGFILES 255
MAXLOGMEMBERS 3
MAXDATAFILES 600
MAXINSTANCES 50
MAXLOGHISTORY 41104
LOGFILE
GROUP 21 (
'/oracle/HE5/origlogA/log_g21m1.dbf',
'/oracle/HE5/mirrlogA/log_g21m2.dbf'
5.启动数据库到Mount状态
SQL>startup mount;
SQL>exit;
6.根据.fnr文件内容,恢复ECC gvshe503 2008-08-26 14:21:44全备份
GVSHE503:orahe5>brrestore -b bdyrdovw.fnr -m all
其实brtools会调用rman生成脚本:
SQL>shutdown immediate;
SQL>@ create_ctr.sh
下面是样本脚本:(注意:resuse和NORESETLOGS ARCHIVELOG两个参数)
GVSHE503:orahe5 34> more create_ctr.sh
STARTUP NOMOUNT
CREATE CONTROLFILEREUSEDATABASE "HE5"NORESETLOGSARCHIVELOG
3.寻找日志文件记录的需要的.fnr文件,并恢复此文件
GVSHE503:orahe5 2> tail -f /oracle/HE5/sapbackup/backHE5.log
从backHE5.log里可以可以看出离2008-8-28日最近的全备份是2008-8-26 14:21:44做的备份,恢复当时的备份信息文件bdyrdovw.fnr
) SIZE 300M,
GROUP 22 (
'/oracle/HE5/origlogB/log_g22m1.dbf',
'/oracle/HE5/mirrlogB/log_g22m2.dbf'
) SIZE 300M,
GROUP 23 (
'/oracle/HE5/origlogA/log_g23m1.dbf',
SQL>select * from v$controlfile;
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- --------------------------------------- --- ---------- --------------
run { allocate channel sbt_1 device type 'SBT_TAPE'
parms 'BLKSIZE=65536 ENV=(XINT_PROFILE=/oracle/HE5/102_64/dbs/initHE5.utl,PROLE_PORT=57323)';
allocate channel sbt_2 device type 'SBT_TAPE'
相关文档
最新文档