如何使用修复损坏的物业
前面我已经介绍了如何使用BBED模拟坏块,本文简要介绍如何使用BBED修复损坏的BLOCK。
1.备份数据文件
要想恢复损坏的文件,需要存在一个良好文件,本文简单冷备份一下文件.
[oracle@jumper conner]$ cp f k
2.修改BBED参数文件
加入备份文件
[oracle@jumper conner]$ vi t
1 /opt/oracle/oradata/conner/f
2 /opt/oracle/oradata/conner/f
3 /opt/oracle/oradata/conner/f
4 /opt/oracle/oradata/conner/k
~
~
~
\"t\" 4L, 259C written
3.破坏数据块
[oracle@jumper conner]$ bbed parfile=d
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 11 22:30:11 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set file 3
FILE# 3
BBED> modify 1000 file 3 block 17
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y
File: /opt/oracle/oradata/conner/f (3)
Block: 17 Offsets: 0 to 511 Dba:0x00c00011
------------------------------------------------------------------------
03e80000 1100c000 75b5a320 611e0000 72b5a320
0900c000 ffff0000
72b5a320
ffff5e00 d 2600c21e 101e581d a91cf61b 471b941a dd192819
6218b417 9715dd14 26146c13 b bc0ffa0e 380e790d
b60cf40b 350b790a c 45088b07 cc060e06 d
32 bytes per line>
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/oracle/oradata/conner/f
BLOCK = 17
Block 17 is corrupt
***
Corrupt block relative dba: 0x00c00011 (file 0, block 17)
Bad header found during verification
Data in bad block -
type: 3 format: 0 rdba: 0x00c00011
last change scn: 0x0000.20a3b575 seq: 0x1 flg: 0x04
consistency value in tail: 0xb
check value in block header: 0x3006, computed block checksum: 0xea05
spare1: 0x0, spare2: 0x0, spare3: 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 : 0
BBED> quit
4.从备份文件中copy良好数据块进行恢复
[oracle@jumper conner]$ bbed parfile=d
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 11 22:33:55 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set file 4
FILE# 4
BBED> show
FILE# 4
BLOCK# 1
OFFSET 0
DBA 0x ( 4,1)
FILENAME /opt/oracle/oradata/conner/k
BIFILE d
LISTFILE t
BLOCKSIZE 8192
MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE d
但是实际上从来就没有认真实行过。 SPOOL No
BBED> copy file 4 block 17 to file 3 block 17;
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y
File: /opt/oracle/oradata/conner/f (3)
Block: 17 Offsets: 0 to 511 Dba:0x00c00011
------------------------------------------------------------------------
1100c000 75b5a320 611e0000 72b5a320
0900c000 ffff0000
72b5a320
ffff5e00 d 2600c21e 101e581d a91cf61b 471b941a dd192819
6218b417 9715dd14 26146c13 b bc0ffa0e 380e790d
b60cf40b 350b790a c 45088b07 cc060e06 d
32 bytes per line>
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/oracle/oradata/conner/f
BLOCK = 17
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 1
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
BBED>
至此恢复完成。
5.数据库验证
SQL> select count(*) from bbed;
select count(*) from bbed
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 3, block # 17)
ORA-01110: data file 3: \'/opt/oracle/oradata/conner/f\'
SQL> alter tablespace users offline;
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
SQL> select count(*) from bbed;
COUNT(*)
----------
523
善用BBED可以从很多棘手的问题中拯救我们的数据库。本案例仅供参考。 查看本文来源
南京治疗宫颈糜烂费用多少钱乌鲁木齐哪白癜风医院好
哺乳期能吃避孕药吗
- 上一页:为和控件创建签署的文件物业
- 下一页:如何使用约束为计划
-
若羌县举办“万里龟山”邢若太行岩彩画巡展 促两地文化交流
为深入加快文化润疆工程施工,已对,新疆阿勒泰地区为首蓟县市在阿勒泰地...
2024-12-30
-
翁虹的魅力真大,奶奶辈的年纪穿蓝裙还挺减龄,就让不像53岁的人
在衣著的身穿搭车中的,色系一直都是不能忽视的,而简单春夏季节身穿的颜...
2024-12-25
-
亦同娱乐圈“尴尬”事件:萨顶顶假唱话筒都拿反了,郑恺没眼看
在生活除此以外,每个人都单单现过一些让自己面临不快的时期,而在这些时...
2024-12-23
-
“滴水不漏”的黑科技飞织鞋,穿上它再也不惧来时!防水防污,一年不洗鞋
春季像“火炉”一样的雨量,整个人就像架在烧烤架上一样。最心痛的还是双...
2024-12-17
-
艺术分享会重回线下,特色书店一族“城市温度”
非典型肺炎的第三年,也是个字符人旧笔记小店的第四年。6同月25日中午,天...
2024-12-16
-
西安房山:6月7日至13日到访过这家餐馆的人员请立即主动报告
请我区6年底7日至6年底13日期间逗留过朝阳区上海当红档(娘娘庙远洋店) 的...
2024-12-13