Check database block corruption

Use command ‘dbv’ to check single file block corruption as


dbv file=/app/oracle/oradata/DB11R2/undotbs01.dbf
DBVERIFY - Verification starting : FILE = /app/oracle/oradata/DB11R2/undotbs01.dbf
Page 11899 is marked corrupt
Corrupt block relative dba: 0x00c02e7b (file 3, block 11899)
Bad check value found during dbv:
Data in bad block:
type: 2 format: 2 rdba: 0x00c02e7b
last change scn: 0x0000.0017a337 seq: 0x2 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0xa3370202
check value in block header: 0x92fe
computed block checksum: 0x1a

Page 35563 is marked corrupt
Corrupt block relative dba: 0x00c08aeb (file 3, block 35563)
Bad check value found during dbv:
Data in bad block:
type: 2 format: 2 rdba: 0x00c08aeb
last change scn: 0x0000.00162521 seq: 0x45 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x25210245
check value in block header: 0xe439
computed block checksum: 0xf2ab



DBVERIFY - Verification complete

Total Pages Examined         : 108800
Total Pages Processed (Data) : 0
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 106906
Total Pages Processed (Seg)  : 10
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 1892
Total Pages Marked Corrupt   : 2
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 1552133 (0.1552133)

We can also use RMAN to check block corruptions of a single datafile or all database


RMAN> backup validate datafile 1;

RMAN> backup validate check logical database archivelog all;

and then query

SQL> select * from v$database_block_corruption;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: