Saturday, May 17, 2014

How to Identify and Repair Corruption in Oracle Databases if ‘DBVerify’ Utility Fails

DBVerify is an inbuilt utility of Oracle database that runs an integrity check on the database to verify the physical data structure. This utility can be performed for both online and offline Oracle databases as well as on your backup files. It proves to be very useful and comes very handy when you required identifying for corruption issues and ensuring that your database or data file are constant. However, this tool can only used for cache-managed data blocks and it can perform faster checks, but it cannot verify control files or redo logs.

There are two methods of performing a DBVerify check. Users can use DBVerify to check database segment or you can check disk blocks of single data file. In the second case, the utility checks the particular disk blocks of a single data file and perform page checks. If you use Automatic Storage Management (ASM) file then you have to provide User Id so that you can allow DBVerify to connect to the Oracle request.

Follow below mentioned command that will indicate how to invoke DBVerify from your OS command line:

'$ dbv file=data01.dbf logfile=verify.log blocksize=8194 feedback=100'

Here data01.dbf is the data file and its related tablespace has a block size of 8194 bytes
The feedback parameter is used to put period that is displayed on the screen after checking every 100 blocks.
Once the process gets completes, you will get to see the following output in your log file:


DBVERIFY – Verification starting : FILE = data01.dbf
DBVERIFY – Verification complete
Total Pages Examined : 640
Total Pages Processed (Data) : 631
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing (Index): 0
Total Pages Marked Corrupt : 0

In this output result “Total Pages Failing” indicates the total number of data or index blocks that were verified and failed the utility checking routine. The “Total Pages Marked Corrupt” denote the number of blocks that is having bad cache header. If you want to verify a small portion of data file then you have to provide the starting and ending block while performing the DBVerify tool.

Alternative method to fix Oracle corruption

In most cases using of inbuilt “DBVerify” utility are successful in detecting and repairing Database corruption. But, in case where it fails to fix the corruption then at such times you should tale help of professional Oracle Database repair and recovery tool. These tools safely and securely repair and restore the entire damaged or lost database objects such as triggers, tables, procedures, package body, functions, views, etc. They come with self explanatory interface and therefore it is easy to operate and helps the recovery process more easy and simple.

0 comments:

Post a Comment