一次oracle数据库数据块损坏的处理过程(四)

2014-11-24 16:55:58 · 作者: · 浏览: 13
ORACLE instance started. Total System Global Area 6714322944 bytes Fixed Size 2226056 bytes Variable Size 5033166968 bytes Database Buffers 1660944384 bytes Redo Buffers 17985536 bytes Database mounted. Database opened.

1.3 数据库坏块的处理

11,此时,查看数据库日志,有数据库坏块方面的报错,虽然只有只报出一个数据库坏块,实际上可能存在更多的坏块

Thu Feb 06 18:52:57 2014

Errors in file/app/oracle/diag/rdbms/epm/epm1/trace/epm1_j000_13117.trc  (incident=460023):

ORA-01578: ORACLE data block corrupted(file # 2, block # 31061)

ORA-01110: data file 2:'/app/oracle/oradata/epm/sysaux01.dbf'

Errors in file /app/oracle/diag/rdbms/epm/epm1/trace/epm1_j000_13117.trc  (incident=460024):

ORA-01578: ORACLE data block corrupted(file # 2, block # 31061)

ORA-01110: data file 2:'/app/oracle/oradata/epm/sysaux01.dbf'

Errors in file/app/oracle/diag/rdbms/epm/epm1/trace/epm1_j000_13117.trc  (incident=460025):

ORA-01578: ORACLE data block corrupted(file # , block # )

ORA-01578: ORACLE data block corrupted(file # 2, block # 31061)

ORA-01110: data file 2:'/app/oracle/oradata/epm/sysaux01.dbf

12,验证数据库坏块,常用的有两种方法,两种方法本质上是一致的,本文采用的是rman命令

1),rman命令

run {

allocate channel d1 type disk;

allocate channel d2 type disk;

backup validate check logical database;

}

验证某个文件

RMAN> backup validate datafile 4;

Starting backup at 06-FEB-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafilebackup set

channel ORA_DISK_1: specifying datafile(s)in backup set

input datafile file number=00004name=/app/oracle/oradata/epm/users01.dbf

channel ORA_DISK_1: backup set complete,elapsed time: 00:04:25

List of Datafiles

=================

File Status Marked Corrupt Empty BlocksBlocks Examined High SCN

---- ------ -------------- --------------------------- ----------

4   FAILED 0              46754        477122          9187726907487

 File Name: /app/oracle/oradata/epm/users01.dbf

 Block Type Blocks Failing Blocks Processed

 ---------- -------------- ----------------

 Data       0              292182         

 Index      0              45604          

 Other      2              92580          

 
validate found one or more corrupt blocks

See trace file/app/oracle/diag/rdbms/epm/epm1/trace/epm1_ora_13757.trc for details

Finished backup at 06-FEB-14

2),dbv命令

验证某个数据库文件

dbvFILE=/app/oracle/oradata/epm/users01.dbf

Page 439168 is influx - most likely media corrupt

Corrupt block relative dba: 0x0106b380(file 4, block 439168)

Fractured block found during dbv:

Data in bad block:

 type: 32 format: 2 rdba: 0x0106b380

 lastchange scn: 0x085b.2ef4cb1d seq: 0xe flg: 0x04

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

 consistency value in tail: 0x72a7201b

 check value in block header: 0xfd1d

 computed block checksum: 0xb9af

Page 439296 is influx - most likely mediacorrupt

Corrupt block relative dba: 0x0106b400(file 4, block 439296)

Fractured block found during dbv:

Data in bad block:

 type: 32 format: 2 rdba: 0x0106b400

 lastchange scn: 0x085b.2ef4cb24 seq: 0x19 flg: 0x04

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

 consistency value in tail: 0x72ac2025

 check value in block header: 0xfd1f

 computed block checksum: 0xb9b4

 
DBVERIFY - Verification complete

Total Pages Examined         : 477120

Total Pages Processed (Data) : 292182

Total Pages Failing   (Data) : 0

Total Pages Processed (Index): 4560