Doc ID: Note:35512.1 Subject: DBVERIFY - Database file Verification Utility (7.3.2 onwards) Type: REFERENCE Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 14-AUG-1997 Last Revision Date: 29-FEB-2000 Language: USAENG DB Verify ~~~~~~~~~ DB Verify is a utility supplied with Oracle releases 7.3.2 onwards. It checks isolated data and index block internals for consistency and can be used to give some degree of confidence that a datafile is free from corruptions. It performs checks at a block level and so unlike 'ANALYZE TABLE .. VALIDATE STRUCTURE CASCADE' it does *NOT* perform any cross checks between index and data blocks. DBV can be used against data files from Oracle releases prior to 7.3 but it must be executed from the ORACLE_HOME environment in which it is supplied. DBV the NLS code and error message files you cannot use the executable stand alone. Usage ~~~~~ Unix: dbv FILE [options] Windows NT: DBVERFxx FILE [options] (xx is the version) (Eg: DBVERF80 for Oracle 8.0) Options: Keyword Description (Default) ---------------------------------------------- FILE File to Verify (NONE) START Start Block (First Block of File) END End Block (Last Block of File) BLOCKSIZE Logical Block Size (2048) LOGFILE Output Log (NONE) FEEDBACK Display Progress (0) Usage Notes ~~~~~~~~~~~ 1. This utility can ONLY be used against DATA files. It CANNOT be used to verify redo log files nor control files. 2. Datafiles are opened read-only. Hence DB Verify CAN be used against open database files where there are no operating system file locks. Note: On some platforms such as Windows NT or VMS database files are locked at operating system level requiring the database to be shut down prior to running DBV. 3. In 7.3 (on Unix) you cannot directly reference a raw device as DBV expects a filename extension. The workaround is to create a symbolic link to the raw device - the link name MUST have an extension. Eg: ln -s /dev/rdsk/mydevice /tmp/mydevice.dbf Now use DBV against /tmp/mydevice.dbf 4. For RAW devices you should use the START and END parameters to avoid running off the end of the Oracle file space. Use: START=1 END= If you get the END value too high DBV can report the last page/s of the file as corrupt as these are beyond the end of the Oracle portion of the raw device. The values for START and END can be found from data dictionary views. To find value for START (First Block of File)for file_id=5, run the query: SQL> select BLOCK_ID, BLOCKS from dba_extents where FILE_ID=5 order by BLOCK_ID; BLOCK_ID BLOCKS ---------- --------------- 2 20 ========> this is the value for START. 22 5 27 5 32 5 You can find the value for END as sum of values for START and BLOCKS, where: START is "First Block of File" BLOCKS is the file size expressed in Oracle blocks You can find value for BLOCKS from v$datafile or dba_data_files views. For example to find out BLOCKS for file#=5: SQL> select BLOCKS from v$datafile where FILE#=5; BLOCKS ---------- 256 Example Results: ~~~~~~~~~~~~~~~~ DBVERIFY - Verification starting : FILE = users01.dbf kdbchk: a row ends in the middle of another tab=0 slot=1 begin=0x7a0 len=0x14 Page 3 failed with check code 5 Page 10 is marked software corrupt Page 12 is marked software corrupt DBVERIFY - Verification complete Total Pages Examined : 512 Total Pages Processed (Data) : 1 Total Pages Failing (Data) : 1 Total Pages Processed (Index): 0 Total Pages Failing (Index): 0 Total Pages Empty : 507 Total Pages Marked Corrupt : 2 Total Pages Influx : 0 If the utility reports any pages to be 'Marked Corrupt' or 'Failing' then re-run the command to see if the problem is transient or not. If there are still corruptions reported then contact your local support centre for advice. Notes: 1. Failing blocks are not dumped symbolically. Only the error is reported. 2. The Page number is the database block number within the file. 3. 'marked software corrupt' actually means the block wrapper is incorrect. This may be soft corrupt, or a completely corrupted DBA, Inc, Seq etc.. As this is not dumped you cannot tell anything about the database block. See 'bchk' [NOTE:33493.1]. References: DBVERIFY START and END parameters [PR:1029262.6]