DBVERIFY: Offline Oracle Database Verification Utility For Datafile And segment

DBVERIFY is command-line utility ( external ) that used to performs physical data structure integrity check like data files, where it verifies data blocks corruption OR Segment corruption of data files.
We can use this utility to verify database backup file integrity check, i.e. Backup files are restorable or not.
This utility also called offline database verification utility, because we can verify/perform online as well as offline database integrity check. As we can perform it offline this utility is significantly faster.

Note:
DBVERIFY utility are limited to cache-managed blocks. ( data blocks )
Only used to verify data files, NOT with control files OR redo log files.

DBVERIFY having two command-line interfaces:

  • One is used to verify single data files blocks.
  • Second is used to verify segments.

 

Using DBVERIFY to Validate a Single Data File ( Disk Blocks )

With the help of this mode, DBVERIFY performs page checks by scanning one or more disk blocks of single data file.

// Invoking help of DBVERIFY command-line utility.
[oracle@12c ~]$ dbv help=y

// Parameters and its terminologies used is as follows:
USERID: Specifies username & password, Only required when you are verifying Oracle ASM files.
FILE: Name of the database file being verified. ( Full path )
START: Start block address from verification would start.
END: End of block address where verification would end.
BLOCKSIZE: Logical Block Size, Default: 8192
HIGH_SCN: Highest Block SCN To Verify
LOGFILE: To generate output logs. Default: On terminal display.
FEEDBACK: Acknowledge the progress of DBV.
HELP: To invoke help.
PARFILE: Parameter File.

To simulate the environment, i am using ‘system01.dbf’ data file for DBVERIFY.

[oracle@12c ~]$ dbv file=/u01/app/oracle/oradata/ORCL/datafile/system01.dbf BLOCKSIZE=8192
DBVERIFY: Release 12.1.0.1.0 – Production on Fri Jun 13 16:25:49 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
DBVERIFY – Verification starting : FILE = /u01/app/oracle/oradata/ORCL/datafile/system01.dbf

DBVERIFY – Verification complete

Total Pages Examined : 101120
Total Pages Processed (Data) : 66783
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 14058
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3298
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 16981
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 4532284 (0.4532284)

Descriptions of above terms used in output report:
Pages: Blocks.
Total Pages Examined:  Total number of blocks in file.
Total Pages Processed:  Total number of formatted blocks were verified.
Total Pages Failing (Data):  Total number of blocks who failed the data block checking.
Total Pages Failing (Index):  Total number of blocks who failed the index block checking.
Total Pages Marked Corrupt:  Total number of those blocks whose cache header is invalid.
–x–

Using DBVERIFY to Validate a Segment

With the help of this mode, we can verify table as well as index segments. It ensures the presence of row chain pointers within the segment being verify.

Note:
Need to specify a segment to be validated.
Need to logged in as SYSDBA privileges.
During validation, segments would be locked.
In case of specified segments belong to index than respected table would be locked during validation.
Some indexes, such as IOTs, do not have parent tables.

// Invoking help of DBVERIFY command-line utility.
[oracle@12c ~]$ dbv help=y

// Parameters and its terminologies used is as follows:
SEGMENT_ID:  Specifies the segment to verify. Segment composed of tablespace ID number (tsn), segment header file number (segfile), and segment header block number (segblock).
Dictionary view used for the same is : SYS_USER_SEGS ( TABLESPACE_ID, HEADER_FILE & HEADER_BLOCK )

Rest of the parameters are same as above mentioned.

Consider following syntax for DBV + Segment:

[oracle@12c ~]$ dbv userid=test/test segment_id=2.4.176

 

***********************************************************************

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

2 thoughts on “DBVERIFY: Offline Oracle Database Verification Utility For Datafile And segment

  1. 1. When I try to run dbv command from my linux command prompt, I get the message “dbv: Command not found” What is the cause?
    2. Also, Is there any way, we can run dbv from sqlplus?

    • Thank you Vychi for writing.
      1. Run DBV command from oracle user after setting database environment variable’s.
      2. There is no way to run DBV from sqlplus.

Leave a Reply to vychi Cancel reply

%d bloggers like this: