ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:17.89KB ,
资源ID:7221733      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7221733.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(在不同情况下使用RMAN对ORACLE数据库进行恢复.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

在不同情况下使用RMAN对ORACLE数据库进行恢复.docx

1、在不同情况下使用RMAN对ORACLE数据库进行恢复1 全数据库的完全恢复 run allocate channel c11 type disk; allocate channel c12 type disk; allocate channel c21 type sbt_tape; allocate channel c22 type sbt_tape; restore controlfile; alter database mount; restore database; recover database; sql alter database open; release channel c1

2、1; release channel c12; release channel c21; release channel c22; 恢复步骤如下:$ svrmgrlsvrmgr connect internalsvrmgr startup nomount$ rmanprod recdbs.rcv rec.log &$ tail f rec.log # 观察日志 使用以上以上的全备份可以对数据库进行全库的恢复,并可以在恢复脚本中直接实现数据库归档日志的应用,将数据库自动恢复到最近的日志记录的状态。 注意:恢复时如果有需要应用很多归档日志,则应用该日志时时间会比较长,一定要耐心等待。全恢复日志如下

3、:Recovery Manager: Release 8.0.5.2.1 - ProductionRMAN-00569: =error message stack follows=RMAN-00554: initialization of internal recovery manager package failedRMAN-04005: error from target database: ORA-01034: ORACLE not availableRecovery Manager: Release 8.0.5.2.1 - ProductionRMAN-06005: connected

4、 to target database: FJTESTRMAN-06008: connected to recovery catalog databaseRMAN run2 3 allocate channel c11 type disk;4 allocate channel c12 type disk;5 allocate channel c21 type sbt_tape;6 allocate channel c22 type sbt_tape;7 restore database;8 recover database;9 sql alter database open;10 releas

5、e channel c11;11 release channel c12;12 release channel c21;13 release channel c22;14 15 RMAN-03022: compiling command: allocateRMAN-03023: executing command: allocateRMAN-08030: allocated channel: c11RMAN-08500: channel c11: sid=13 devtype=DISKRMAN-03022: compiling command: allocateRMAN-03023: exec

6、uting command: allocateRMAN-08030: allocated channel: c12RMAN-08500: channel c12: sid=14 devtype=DISKRMAN-03022: compiling command: allocateRMAN-03023: executing command: allocateRMAN-08030: allocated channel: c21RMAN-08500: channel c21: sid=15 devtype=SBT_TAPERMAN-03022: compiling command: allocate

7、RMAN-03023: executing command: allocateRMAN-08030: allocated channel: c22RMAN-08500: channel c22: sid=17 devtype=SBT_TAPERMAN-03022: compiling command: setRMAN-03022: compiling command: restoreRMAN-03025: performing implicit partial resync of recovery catalogRMAN-03023: executing command: partial re

8、syncRMAN-08003: starting partial resync of recovery catalogRMAN-08005: partial resync completeRMAN-03022: compiling command: IRESTORERMAN-03023: executing command: IRESTORERMAN-08016: channel c21: starting datafile backupset restoreRMAN-08502: set_count=28 set_stamp=402253457RMAN-08016: channel c22:

9、 starting datafile backupset restoreRMAN-08502: set_count=29 set_stamp=402253577RMAN-08019: channel c21: restoring datafile 1RMAN-08509: destination for restore of datafile 1: /dev/vx/rdsk/datadg/system01RMAN-08019: channel c22: restoring datafile 3RMAN-08509: destination for restore of datafile 3:

10、/dev/vx/rdsk/datadg/tempaRMAN-08019: channel c21: restoring datafile 2RMAN-08509: destination for restore of datafile 2: /dev/vx/rdsk/datadg/rbsaRMAN-08019: channel c22: restoring datafile 16RMAN-08509: destination for restore of datafile 16: /dev/vx/rdsk/datadg/t3s200n1RMAN-08023: channel c21: rest

11、ored backup piece 1RMAN-08511: piece handle=dbf_28_402253457_1 params=NULLRMAN-08024: channel c21: restore completeRMAN-08016: channel c21: starting datafile backupset restoreRMAN-08502: set_count=31 set_stamp=402253614RMAN-08019: channel c21: restoring datafile 4RMAN-08509: destination for restore

12、of datafile 4: /dev/vx/rdsk/datadg/toolsRMAN-08019: channel c21: restoring datafile 7RMAN-08509: destination for restore of datafile 7: /dev/vx/rdsk/datadg/tempbRMAN-08023: channel c22: restored backup piece 1RMAN-08511: piece handle=dbf_29_402253577_1 params=NULLRMAN-08024: channel c22: restore com

13、pleteRMAN-08016: channel c22: starting datafile backupset restoreRMAN-08502: set_count=32 set_stamp=402253679RMAN-08019: channel c22: restoring datafile 5RMAN-08509: destination for restore of datafile 5: /dev/vx/rdsk/datadg/usersRMAN-08019: channel c22: restoring datafile 13RMAN-08509: destination

14、for restore of datafile 13: /dev/vx/rdsk/datadg/t3s1n1RMAN-08023: channel c21: restored backup piece 1RMAN-08511: piece handle=dbf_31_402253614_1 params=NULLRMAN-08024: channel c21: restore completeRMAN-08016: channel c21: starting datafile backupset restoreRMAN-08502: set_count=30 set_stamp=4022536

15、14RMAN-08019: channel c21: restoring datafile 6RMAN-08509: destination for restore of datafile 6: /dev/vx/rdsk/datadg/rbsbRMAN-08019: channel c21: restoring datafile 17RMAN-08509: destination for restore of datafile 17: /dev/vx/rdsk/datadg/t2s200n8RMAN-08023: channel c21: restored backup piece 1RMAN

16、-08511: piece handle=dbf_30_402253614_1 params=NULLRMAN-08024: channel c21: restore completeRMAN-08016: channel c21: starting datafile backupset restoreRMAN-08502: set_count=26 set_stamp=402253457RMAN-08019: channel c21: restoring datafile 8RMAN-08509: destination for restore of datafile 8: /dev/vx/

17、rdsk/datadg/system02RMAN-08019: channel c21: restoring datafile 10RMAN-08509: destination for restore of datafile 10: /dev/vx/rdsk/datadg/t3s500n2RMAN-08023: channel c22: restored backup piece 1RMAN-08511: piece handle=dbf_32_402253679_1 params=NULLRMAN-08024: channel c22: restore completeRMAN-08016

18、: channel c22: starting datafile backupset restoreRMAN-08502: set_count=25 set_stamp=402253457RMAN-08023: channel c21: restored backup piece 1RMAN-08511: piece handle=dbf_26_402253457_1 params=NULLRMAN-08024: channel c21: restore completeRMAN-08016: channel c21: starting datafile backupset restoreRM

19、AN-08502: set_count=27 set_stamp=402253457RMAN-08019: channel c22: restoring datafile 9RMAN-08509: destination for restore of datafile 9: /dev/vx/rdsk/datadg/t2s500n2RMAN-08019: channel c21: restoring datafile 11RMAN-08509: destination for restore of datafile 11: /dev/vx/rdsk/datadg/t2s500n10RMAN-08

20、019: channel c22: restoring datafile 12RMAN-08509: destination for restore of datafile 12: /dev/vx/rdsk/datadg/t3s500n1RMAN-08019: channel c21: restoring datafile 14RMAN-08509: destination for restore of datafile 14: /dev/vx/rdsk/datadg/t2s200n10RMAN-08023: channel c22: restored backup piece 1RMAN-0

21、8511: piece handle=dbf_25_402253457_1 params=NULLRMAN-08024: channel c22: restore completeRMAN-08016: channel c22: starting datafile backupset restoreRMAN-08502: set_count=33 set_stamp=402253726RMAN-08019: channel c22: restoring datafile 15RMAN-08509: destination for restore of datafile 15: /dev/vx/

22、rdsk/datadg/t2s1n1RMAN-08023: channel c21: restored backup piece 1RMAN-08511: piece handle=dbf_27_402253457_1 params=NULLRMAN-08024: channel c21: restore completeRMAN-08023: channel c22: restored backup piece 1RMAN-08511: piece handle=dbf_33_402253726_1 params=NULLRMAN-08024: channel c22: restore co

23、mpleteRMAN-03023: executing command: partial resyncRMAN-08003: starting partial resync of recovery catalogRMAN-08005: partial resync completeRMAN-03022: compiling command: recoverRMAN-03022: compiling command: recover(1)RMAN-03022: compiling command: recover(2)RMAN-03022: compiling command: recover(

24、3)RMAN-03023: executing command: recover(3)RMAN-08054: starting media recoveryRMAN-08515: archivelog filename=/archlog/arch2_1.log thread=2 sequence=1RMAN-08515: archivelog filename=/archlog/arch1_1.log thread=1 sequence=1RMAN-08515: archivelog filename=/archlog/arch2_2.log thread=2 sequence=2RMAN-0

25、8515: archivelog filename=/archlog/arch2_3.log thread=2 sequence=3RMAN-08515: archivelog filename=/archlog/arch2_4.log thread=2 sequence=4RMAN-08515: archivelog filename=/archlog/arch1_2.log thread=1 sequence=2RMAN-08515: archivelog filename=/archlog/arch2_5.log thread=2 sequence=5RMAN-08515: archiv

26、elog filename=/archlog/arch2_6.log thread=2 sequence=6RMAN-08515: archivelog filename=/archlog/arch1_3.log thread=1 sequence=3RMAN-08515: archivelog filename=/archlog/arch2_7.log thread=2 sequence=7RMAN-08515: archivelog filename=/archlog/arch2_8.log thread=2 sequence=8RMAN-08515: archivelog filenam

27、e=/archlog/arch2_9.log thread=2 sequence=9RMAN-08055: media recovery completeRMAN-03022: compiling command: recover(4)RMAN-03022: compiling command: sqlRMAN-06162: sql statement: alter database openRMAN-03023: executing command: sqlRMAN-03026: error recovery releasing channel resourcesRMAN-08031: re

28、leased channel: c12RMAN-08031: released channel: c11RMAN-08031: released channel: c21RMAN-08031: released channel: c22Recovery Manager complete.以下将不注明恢复日志。2 表空间的恢复run allocate channel c11 type disk; allocate channel c12 type disk; allocate channel c21 type sbt_tape; allocate channel c22 type sbt_tap

29、e; sql alter tablespace test_tbs1 offline immediate; # 使表空间离线 restore tablespace test_tbs1; # 物理恢复表空间 recover tablespace test_tbs1; # 逻辑恢复表空间(应用日志) sql alter tablespace test_tbs1 online; # 使表空间在线 release channel c11; release channel c12; release channel c21; release channel c22; 表空间恢复分为离线和在线两种,数据库在线

30、时,如果某表空间发生损坏,可以进行在线的表空间恢复,该任务不会影响数据库其他表空间的正常运行。 当系统表空间损坏,导致数据库不能正常运行,因此需离线恢复系统表空间。测试步骤如下:在线恢复某应用表空间a) 破坏某表空间数据文件$ cd /dev/vx/rdsk/datadg$ dd if=data01 of=data02 bs=10kb) 对该数据文件进行操作svrmgr alter system check datafiles;svrmgr select file#,status,error from v$datafile_header如果发现错误,则该数据库文件已经被损坏。c) 恢复该表空间svrmgr alter tablespace test_tbs1 offline;$ rmanprod rectbs.rcv rec2.log &svrmgr select file#,status,error from v$datafile_header在使用上命令查看恢复情况,如果所有的数据文件状态都为“online”,即表明本恢复成功。3 系统表空间的恢复(数据文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1