Powered By Blogger

Wednesday, January 26, 2011

Using Database Verify command on the Datafiles for corruption

Below is the script file for using DBverify command against the datafiles.

Save the below file as Shell file using extension .sh in unix or Batch file as .bat in windows and execute

dbv file=/NVAR/oracle/oradata/NAVADEMO/system01.dbf blocksize=8192 logfile=system01.dbf.1.log dbv file=/NVAR/oracle/oradata/NAVADEMO/sysaux01.dbf blocksize=8192 logfile=sysaux01.dbf.2.log dbv file=/NVAR/oracle/oradata/NAVADEMO/undotbs01.dbf blocksize=8192 logfile=undotbs01.dbf.3.log dbv file=/NVAR/oracle/oradata/NAVADEMO/users01.dbf blocksize=8192 logfile=users01.dbf.4.log dbv file=/NVAR/oracle/oradata/NAVADEMO/qliveprod_data01.dbf blocksize=8192 logfile=qliveprod_data01.dbf.5.log dbv file=/NVAR/oracle/oradata/NAVADEMO/qliveprod_indx.dbf blocksize=8192 logfile=qliveprod_indx.dbf.6.log dbv file=/NVAR/oracle/oradata/NAVADEMO/tiger_data01.dbf blocksize=8192 logfile=tiger_data01.dbf.7.log dbv file=/NVAR/oracle/oradata/NAVADEMO/qliveprod_data02.dbf blocksize=8192 logfile=qliveprod_data02.dbf.8.log dbv file=/NVAR/oracle/oradata/NAVADEMO/qliveprod_data03.dbf blocksize=8192 logfile=qliveprod_data03.dbf.9.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR_data01.dbf blocksize=8192 logfile=NVAR_data01.dbf.10.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR_idx01.dbf blocksize=8192 logfile=NVAR_idx01.dbf.11.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR_data02.dbf blocksize=8192 logfile=NVAR_data02.dbf.12.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR_data03.dbf blocksize=8192 logfile=NVAR_data03.dbf.13.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR02d02.dbf blocksize=8192 logfile=NVAR02d02.dbf.14.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR01d01.dbf blocksize=8192 logfile=NVAR01d01.dbf.15.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR01i01.dbf blocksize=8192 logfile=NVAR01i01.dbf.16.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR02d01.dbf blocksize=8192 logfile=NVAR02d01.dbf.17.log dbv file=/NVAR/oracle/oradata/NAVADEMO/NVAR02i01.dbf blocksize=8192 logfile=NVAR02i01.dbf.18.log

Below is the logfile created for a file which has no corruption ,by the above script file.
DBVERIFY: Release 11.1.0.6.0 - Production on Thu Apr 29 13:07:27 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.

DBVERIFY-Verification starting : FILE = /nvar/oracle/oradata/NAVADEMO/nvar_data01.dbf
DBVERIFY - Verification complete
Total Pages Examined : 513280
Total Pages Processed (Data) : 372277
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 103009
Total Pages Failing (Index): 0
Total Pages Processed (Other): 35162
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 2832
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 3358059738 (1685.3358059738)

Below is the logfile created for a file which has corruptions ,by the above script file.

DBVERIFY: Release 11.1.0.6.0 - Production on Thu Apr 29 13:08:07 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.

DBVERIFY-Verification starting : FILE = /nvar/oracle/oradata/NAVADEMO/nvar_data03.dbf
Page 38576 is marked corrupt
Corrupt block relative dba: 0x034096b0 (file 13, block 38576)
Bad header found during dbv:
Data in bad block:
type: 97 format: 0 rdba: 0x74616369
last change scn: 0x6e76.2f6e6f69 seq: 0x64 flg: 0x2e
spare1: 0x70 spare2: 0x6c spare3: 0x652d
consistency value in tail: 0x794d0602
check value in block header: 0x736d
computed block checksum: 0x60a
Page 48062 is marked corrupt
Corrupt block relative dba: 0x0340bbbe (file 13, block 48062)
Bad header found during dbv:
Data in bad block:
type: 83 format: 5 rdba: 0x5b203230
last change scn: 0x7270.412f3432 seq: 0x2f flg: 0x32
spare1: 0x52 spare2: 0x30 spare3: 0x3a30
consistency value in tail: 0x80c30601
check value in block header: 0x3130
block checksum disabled
Page 49482 is marked corrupt
Corrupt block relative dba: 0x0340c14a (file 13, block 49482)
Bad header found during dbv:
Data in bad block:
type: 58 format: 4 rdba: 0x2b203732
last change scn: 0x205d.30333530 seq: 0x22 flg: 0x47
spare1: 0x33 spare2: 0x3a spare3: 0x2f20
consistency value in tail: 0x80c40601
check value in block header: 0x5445
computed block checksum: 0x3bbd
Page 70259 is influx - most likely media corrupt
Corrupt block relative dba: 0x03411273 (file 13, block 70259)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x03411273
last change scn: 0x0695.a7c6e680 seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x2563
computed block checksum: 0xe719
Page 81382 is marked corrupt
Corrupt block relative dba: 0x03413de6 (file 13, block 81382)
Bad header found during dbv:
Data in bad block:
type: 49 format: 0 rdba: 0x32303a38
last change scn: 0x3033.35302b20 seq: 0x5d flg: 0x20
spare1: 0x3a spare2: 0x35 spare3: 0x5445
consistency value in tail: 0x47e1060d
check value in block header: 0x4722
block checksum disabled
Page 101964 is influx - most likely media corrupt
Corrupt block relative dba: 0x03418e4c (file 13, block 101964)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x03418e4c
last change scn: 0x0695.a78be66c seq: 0x1 flg: 0x06
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x6f18
computed block checksum: 0xafef
Page 109891 is marked corrupt
Corrupt block relative dba: 0x0341ad43 (file 13, block 109891)
Bad header found during dbv:
Data in bad block:
type: 202 format: 6 rdba: 0x32000000
last change scn: 0x000a.000a6b00 seq: 0x5f flg: 0x09
spare1: 0xba spare2: 0xbe spare3: 0x6000
consistency value in tail: 0xcac70624
check value in block header: 0x900
block checksum disabled
Page 111680 is marked corrupt
Corrupt block relative dba: 0x0341b440 (file 13, block 111680)
Bad header found during dbv:
Data in bad block:
type: 202 format: 6 rdba: 0x32000000
last change scn: 0x0720.00072200 seq: 0x0 flg: 0x21
spare1: 0xba spare2: 0xbe spare3: 0x7513
consistency value in tail: 0x410e0602
check value in block header: 0x1
block checksum disabled
Page 133669 is influx - most likely media corrupt
Corrupt block relative dba: 0x03420a25 (file 13, block 133669)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x03420a25
last change scn: 0x0695.a7cf9b37 seq: 0x1 flg: 0x06
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x9232
computed block checksum: 0xfa1e
Page 134914 is marked corrupt
Corrupt block relative dba: 0x03420f02 (file 13, block 134914)
Bad header found during dbv:
Data in bad block:
type: 202 format: 6 rdba: 0x32000000
last change scn: 0x0715.00071800 seq: 0x0 flg: 0x16
spare1: 0xba spare2: 0xbe spare3: 0x730e
consistency value in tail: 0xa8750601
check value in block header: 0x1
computed block checksum: 0x1167
Page 169859 is marked corrupt
Corrupt block relative dba: 0x03429783 (file 13, block 169859)
Bad header found during dbv:
Data in bad block:
type: 2 format: 0 rdba: 0x00140000
last change scn: 0x0000.03e80000 seq: 0x0 flg: 0x00
spare1: 0x1 spare2: 0x0 spare3: 0x0
consistency value in tail: 0xf9f82802
check value in block header: 0x0
block checksum disabled
Page 238087 is influx - most likely media corrupt
Corrupt block relative dba: 0x0343a207 (file 13, block 238087)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x0343a207
last change scn: 0x0695.a7dc8aa6 seq: 0x1 flg: 0x06
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0xa4f7
computed block checksum: 0x6dd4

DBVERIFY - Verification complete
Total Pages Examined : 256000
Total Pages Processed (Data) : 192131
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 46117
Total Pages Failing (Index): 0
Total Pages Processed (Other): 14782
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 2958
Total Pages Marked Corrupt : 12
Total Pages Influx : 4
Total Pages Encrypted : 0
Highest block SCN : 3358059738 (1685.3358059738)

No comments:

Post a Comment