基于rman的坏块恢复
转载请注明出处 http://blog.csdn.net/guoyjoe/article/details/30965303 实验步骤如下: 1、使用rman备份全库 Recovery Manager: Release 11.2.0.3.0 - Production on Sun Jun 8 15:30:35 2014Copyright (c) 1982, 2011, Oracle and/or its affiliates. All
转载请注明出处 http://blog.csdn.net/guoyjoe/article/details/30965303
实验步骤如下:
1、使用rman备份全库
Recovery Manager: Release 11.2.0.3.0 - Production on Sun Jun 8 15:30:35 2014 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PROD (DBID=254815294) RMAN> backup database; Starting backup at 08-JUN-14 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=142 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/PROD/system01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/PROD/tp01.dbf input datafile file number=00002 name=/u01/app/oracle/oradata/PROD/sysaux01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/PROD/undotbs01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/PROD/users01.dbf channel ORA_DISK_1: starting piece 1 at 08-JUN-14 channel ORA_DISK_1: finished piece 1 at 08-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/dbs/01pab691_1_1 tag=TAG20140608T153040 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 08-JUN-14 channel ORA_DISK_1: finished piece 1 at 08-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/dbs/02pab69q_1_1 tag=TAG20140608T153040 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 08-JUN-14
(1)针对gyj_t1表的20869号块做测试,现在可以查出记录
gyj@PROD> select id,name,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from gyj_t1; ID NAME DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) ---------- ---------- ------------------------------------ ------------------------------------ 1 oracledba 5 20869
[root@jfdb ~]# su - oracle [oracle@jfdb ~]$ bbed parfile=par.txt Password: BBED: Release 2.0.0.0.0 - Limited Production on Sun Jun 8 15:33:10 2014 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> set file 5 block 20869 FILE# 5 BLOCK# 20869 BBED> map /v File: /u01/app/oracle/oradata/PROD/tp01.dbf (5) Block: 20869 Dba:0x01405185 ------------------------------------------------------------ KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 ub1 type_kcbh @0 ub1 frmt_kcbh @1 ub1 spare1_kcbh @2 ub1 spare2_kcbh @3 ub4 rdba_kcbh @4 ub4 bas_kcbh @8 ub2 wrp_kcbh @12 ub1 seq_kcbh @14 ub1 flg_kcbh @15 ub2 chkval_kcbh @16 ub2 spare3_kcbh @18 struct ktbbh, 72 bytes @20 ub1 ktbbhtyp @20 union ktbbhsid, 4 bytes @24 struct ktbbhcsc, 8 bytes @28 sb2 ktbbhict @36 ub1 ktbbhflg @38 ub1 ktbbhfsl @39 ub4 ktbbhfnx @40 struct ktbbhitl[2], 48 bytes @44 struct kdbh, 14 bytes @100 ub1 kdbhflag @100 sb1 kdbhntab @101 sb2 kdbhnrow @102 sb2 kdbhfrre @104 sb2 kdbhfsbo @106 sb2 kdbhfseo @108 sb2 kdbhavsp @110 sb2 kdbhtosp @112 struct kdbt[1], 4 bytes @114 sb2 kdbtoffs @114 sb2 kdbtnrow @116 sb2 kdbr[1] @118 ub1 freespace[8038] @120 ub1 rowdata[30] @8158 ub4 tailchk @8188 BBED> p kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x01405185 ub4 bas_kcbh @8 0x00176fed ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0xc140 ub2 spare3_kcbh @18 0x0000 BBED> m /x ff offset 14 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y File: /u01/app/oracle/oradata/PROD/tp01.dbf (5) Block: 20869 Offsets: 14 to 525 Dba:0x01405185 ------------------------------------------------------------------------ ff0640c1 00000100 00003945 0000eb6f 17000000 00000200 32008051 40010700 20008b02 00002c49 c0002301 02000080 0000876d 17000300 1a007503 0000bf1f c0002501 0c000120 0000ed6f 17000000 00000000 00000001 0100ffff 14007a1f 741f741f 00000100 7a1f0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line> BBED> sum apply Check value for File 5, Block 20869: current = 0xc1be, required = 0xc1be
BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/PROD/tp01.dbf BLOCK = 20869 Block 20869 is corrupt Corrupt block relative dba: 0x01405185 (file 0, block 20869) Fractured block found during verification Data in bad block: type: 6 format: 2 rdba: 0x01405185 last change scn: 0x0000.00176fed seq: 0xff flg: 0x06 spare1: 0x0 spare2: 0x0 spare3: 0x0 consistency value in tail: 0x6fed0601 check value in block header: 0xc1be computed block checksum: 0x0 DBVERIFY - Verification complete Total Blocks Examined : 1 Total Blocks Processed (Data) : 0 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 0 Total Blocks Failing (Index): 0 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 1 Total Blocks Influx : 2 Message 531 not found; product=RDBMS; facility=BBED (4)确定不能查gyj_t1表的记录
gyj@PROD> alter system flush buffer_cache; System altered. gyj@PROD> select id,name,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from gyj_t1; select id,name,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from gyj_t1 * ERROR at line 1: ORA-01578: ORACLE data block corrupted (file # 5, block # 20869) ORA-01110: data file 5: '/u01/app/oracle/oradata/PROD/tp01.dbf'
RMAN> backup validate datafile 5; Starting backup at 08-JUN-14 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00005 name=/u01/app/oracle/oradata/PROD/tp01.dbf channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07 List of Datafiles ================= File Status Marked Corrupt Empty Blocks Blocks Examined High SCN ---- ------ -------------- ------------ --------------- ---------- 5 FAILED 0 114 64000 1659211 File Name: /u01/app/oracle/oradata/PROD/tp01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 1 58883 Index 0 4221 Other 0 782 validate found one or more corrupt blocks See trace file /u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_ora_2750.trc for details Finished backup at 08-JUN-14
gyj@PROD> select FILE#,BLOCK#,BLOCKS,CORRUPTION_CHANGE#,CORRUPTION_TYPE from v$database_block_corruption where file#=5; FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO ---------- ---------- ---------- ------------------ --------- 5 20869 1 0 FRACTURED
5、使用rman恢复坏块
RMAN> blockrecover datafile 5 block 20869; Starting recover at 08-JUN-14 using channel ORA_DISK_1 channel ORA_DISK_1: restoring block(s) channel ORA_DISK_1: specifying block(s) to restore from backup set restoring blocks of datafile 00005 channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/dbs/01pab691_1_1 channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/dbs/01pab691_1_1 tag=TAG20140608T153040 channel ORA_DISK_1: restored block(s) from backup piece 1 channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 08-JUN-14
gyj@PROD> select FILE#,BLOCK#,BLOCKS,CORRUPTION_CHANGE#,CORRUPTION_TYPE from v$database_block_corruption where file#=5; no rows selected
gyj@PROD> select id,name,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from gyj_t1; ID NAME DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) ---------- ---------- ------------------------------------ ------------------------------------ 1 oracledba 5 20869

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

打开微信,在我中选择设置,选择通用后选择存储空间,在存储空间选择管理,选择要恢复文件的对话选择感叹号图标。教程适用型号:iPhone13系统:iOS15.3版本:微信8.0.24解析1首先打开微信,在我的页面中点击设置选项。2接着在设置页面中找到并点击通用选项。3然后在通用页面中点击存储空间。4接下来在存储空间页面中点击管理。5最后选择要恢复文件的对话,点击右侧的感叹号图标。补充:微信文件一般几天过期1要是微信接收的文件并没有点开过的情况下,那在七十二钟头之后微信系统会清除掉,要是己经查看了微信

无痕浏览是一种非常方便的浏览方式,可以在使用电脑或移动设备上网时保护个人隐私。无痕浏览模式通常会阻止浏览器记录访问历史、保存Cookie和缓存文件,以及防止正在浏览的网站在浏览器中留下任何痕迹。但是,对于一些特殊的情况,我们可能需要恢复无痕浏览的浏览记录。首先,我们需要明确一点:无痕浏览模式的目的是保护隐私,防止他人从浏览器中获取用户的上网记录。因此,无痕浏

小米云相册怎么恢复到本地?小米云相册APP中是可以恢复到本地,但是多数的小伙伴不知道小米云相册如何恢复到本地中,接下来就是小编为用户带来的小米云相册恢复到本地方法图文教程,感兴趣的用户快来一起看看吧!小米云相册怎么恢复到本地1、首先打开小米手机中的设置功能,主界面选择【个人头像】;2、然后进入到小米账号的界面,点击【云服务】功能;3、接着跳转到小米云服务的功能,选择其中的【云备份】;4、最后在如下图所示的界面,点击【云相册】即可恢复相册到本地。

在抖音这个充满创意与活力的短视频平台上,我们不仅可以欣赏到各种精彩内容,还能与志同道合的朋友展开深入的交流。其中,聊天火花作为衡量双方互动热度的重要指标,常常在不经意间点燃我们与好友之间的情感纽带。然而,有时由于一些原因,聊天火花可能会断开,那么如果我们想要恢复聊天火花究竟该如何操作呢,这篇教程攻略就将为大家带来详细的内容攻略介绍,希望能帮助到大家。抖音聊天火花断了怎么恢复?1、打开抖音的消息页面,选择好友聊天。2、互发消息聊天。3、连续发消息3天,就可以获得火花标识。在3天基础上,互发图片或视

Windows10的2019年5月更新具有新的、更亮的默认桌面背景。它看起来很棒-带有新的浅色主题。如果您使用Windows10的深色主题,您可能需要更深的背景。奇怪的是,Windows10的原始桌面背景已从最新版本的Windows10中删除。您必须从Web下载它或从旧的Windows10PC复制其文件。尽管我们无法在Microsoft的官方网站上找到此壁纸图片,但您可以从其他来源下载它。我们在Imgur上找到了一份4K分辨率的Windows10原始桌面壁纸的副本。此外,还有其他尺寸和更多默认壁

Emmo日记是一款专为记录心情而设计的软件,它为你提供了一个私密的日记空间,让你能够记录下每天的重要或琐碎的事情。通过独特的情绪识别技术,Emmo日记还能帮助你更好地理解和处理自己的情绪。但是有的时候发现自己日记被误删了以后却不知道该如何恢复,那么这篇教程攻略就将为大家带来详细的恢复攻略介绍,希望能帮助到各位有需要的小伙伴们。emmo怎么找回之前的日记?1、在emmo选择屏幕左下角【设置】图标点击进入;2、选择屏幕【数据备份与恢复】图标,进入操作即可。

掌握HTTP301状态码的含义:网页重定向的常见应用场景随着互联网的迅猛发展,人们对网页交互的要求也越来越高。在网页设计领域,网页重定向是一种常见且重要的技术,通过HTTP301状态码来实现。本文将探讨HTTP301状态码的含义以及在网页重定向中的常见应用场景。HTTP301状态码是指永久重定向(PermanentRedirect)。当服务器接收到客户端发

小红书作为一款流行的社交电商平台,用户可以在这里分享购物心得、生活点滴等。在使用过程中,有些用户可能会遇到自己发布的评论被删除的情况。那么,小红书被删除的评论怎么恢复呢?一、小红书被删除的评论怎么恢复?如果发现评论被误删,用户可以选择静待小红书官方团队进行恢复。在这种情况下,最好保持耐心等待,因为官方团队可能会在一段时间后自动处理并恢复评论。如果您发现评论被删除,可以考虑重新发布类似内容。但在重新发布时,请确保内容符合小红书的社区准则,以免再次遭到删除。3.联系小红书客服:如果认为自己的评论被误
