如何使用rman 检查oracle数据库坏块

如何使用rman 检查oracle数据库坏块,第1张

如何使用rman 检查oracle数据库坏块

oracle检测坏块的方式:

1、利用oracle的RMAN工具

2、利用dbv工具检测

3、利用 exp/imp工具检测

oracle检测坏块的方式:

1、利用oracle的RMAN工具

2、利用dbv工具检测

3、利用 exp/imp工具检测

其中2、3的方式无法彻底检测所有坏块,所以重点介绍下RMAN方式

RMAN>backup check logical validate datafile n

可以检查数据文件是否包含坏块,同时并不产生实际的备份输出。

而且当使用Recovery Manager进行实际的数据库备份时,同时也就进行了坏块

检查。但要注意的是,在线使用Recovery Manager扫描坏块和备份时,需要数

据库运行在归档模式(archive log),否则只能在数据库未打开的情况下进行。

【Oracle数据恢复】ORA-01578错误解析

一般认为ORA-1578是 数据块物理坏块/损坏的一种,不同于逻辑损坏/坏块,其错误信息如下:

[oracle@oel8 dirdat]$ oerr ora 1578

01578, 00000, "ORACLE data block corrupted (file # %s, block # %s)"

// *Cause: The data block indicated was corrupted, mostly due to software

// errors.

// *Action: Try to restore the segment containing the block indicated. This

// may involve dropping the segment and recreating it. If there

// is a trace file, report the errors in it to your ORACLE

// representative

这个1578一般 会伴随ORA-1110出现,一旦ORACLE读取到存在损坏的块就会报出:

SQL>select * from scott.emp

select * from scott.emp

*

ERROR at line 1:

ORA-01578: ORACLE data block corrupted (file # 11, block # 34) 这里的FILE#是 RFN

ORA-01110: data file 6:'/home/oracle/corrclass.dbf' 这里的是AFN

断裂的数据块Fractured Block:

Corrupt block relative dba: 0x0380e573 (file 14, block 58739)

Fractured block found during buffer read

Data in bad block -

type: 6 format: 2 rdba: 0x0380e573

last change scn: 0x0288.8e5a2f78 seq: 0x1 flg: 0x04

consistency value in tail: 0x00780601

check value in block header: 0x8739, computed block checksum: 0x2f00

spare1: 0x0, spare2: 0x0, spare3: 0x0

***

Reread of rdba: 0x0380e573 (file 14, block 58739) found same corrupted data

或者错误的校验和checksum

Corrupt block relative dba: 0x0380a58f (file 14, block 42383)

Bad check value found during buffer read

Data in bad block -

type: 6 format: 2 rdba: 0x0380a58f

last change scn: 0x0288.7784c5ee seq: 0x1 flg: 0x06

consistency value in tail: 0xc5ee0601

check value in block header: 0x68a7, computed block checksum: 0x2f00

spare1: 0x0, spare2: 0x0, spare3: 0x0

***

Reread of rdba: 0x0380a58f (file 14, block 42383) found same corrupted data

或者错误的块头

Corrupt block relative dba: 0x0d805a89 (file 54, block 23177)

Bad header found during buffer read

Data in bad block -

type: 6 format: 2 rdba: 0x0d805b08

last change scn: 0x0692.86dc08e3 seq: 0x1 flg: 0x04

consistency value in tail: 0x08e30601

check value in block header: 0x2a6e, computed block checksum: 0x0

spare1: 0x0, spare2: 0x0, spare3: 0x0

***

Reread of rdba: 0x0d805a89 (file 54, block 23177) found valid data

一些可能引起ORA-1578的BUG 列表如下:

如果自己搞不定可以找ASKMACLEAN专业数据库修复团队成员帮您恢复!


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/10812196.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-11
下一篇 2023-05-11

发表评论

登录后才能评论

评论列表(0条)

保存