Note that the database should be off line before performing a DBVERIFY.
But it will work with online data files also,but its not recommended.
DBVERIFY is invoked using dbv command.It should be called from ORACLE_HOME/bin directory.
To access help on DB_VERIFY type:
dbv help=y
To perform a simple DBVIRIFY use below command.Output will be written to the dbv.log file.
>dbv file=/u01/oracle/product/10.2.0/oradata/orcl/users01.dbf logfile=dbv.log
Note that this is only a verification tool to get a idea about data files,whether they are corrupted or not.You'll have to follow other methods to recover corrupted data files.
Exmples:
dbv example of a datafile with no corruption.
(Pages are data blocks)
DBVERIFY: Release 11.2.0.2.0 - Production on Tue Mar 13 15:41:47 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /..../a_01.dbf
DBVERIFY - Verification complete
Total Pages Examined : 193648
Total Pages Processed (Data) : 43877
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 65406
Total Pages Failing (Index): 0
Total Pages Processed (Other): 18833
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 65532
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 3753900931 (1388.3753900931)
dbv example of a datafile with a corruption.
DBVERIFY: Release 11.2.0.2.0 - Production on Tue Mar 13 15:32:33 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /..../a_02.dbf
Page 127845 is influx - most likely media corrupt
Corrupt block relative dba: 0x03c1f365 (file 15, block 127845)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x03c1f365
last change scn: 0x056c.dd2d2b24 seq: 0x1 flg: 0x06
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x21e0
computed block checksum: 0x4ce
Page 127846 is marked corrupt
Corrupt block relative dba: 0x03c1f366 (file 15, block 127846)
Completely zero block found during dbv:
Page 127847 is marked corrupt
Corrupt block relative dba: 0x03c1f367 (file 15, block 127847)
Completely zero block found during dbv:
Page 127848 is marked corrupt
Corrupt block relative dba: 0x03c1f368 (file 15, block 127848)
Completely zero block found during dbv:
......
.....
....
...
Page 141294 is marked corrupt
Corrupt block relative dba: 0x03c227ee (file 15, block 141294)
Completely zero block found during dbv:
Page 141295 is marked corrupt
Corrupt block relative dba: 0x03c227ef (file 15, block 141295)
Completely zero block found during dbv:
Page 141296 is marked corrupt
Corrupt block relative dba: 0x03c227f0 (file 15, block 141296)
Completely zero block found during dbv:
DBVERIFY - Verification complete
Total Pages Examined : 141296
Total Pages Processed (Data) : 60687
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 43333
Total Pages Failing (Index): 0
Total Pages Processed (Other): 5417
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 18407
Total Pages Marked Corrupt : 13452
Total Pages Influx : 1
Total Pages Encrypted : 0
Highest block SCN : 3753900926 (1388.3753900926)
No comments:
Post a Comment