Wednesday, February 20, 2013

Check DATAPUMP Dump File is corrupted or not


Some times we may be in a situation, to check whether the dump file exported long time back is VALID or not.

Or Application Team is saying that the dumpfile provided by us is corrupted.

Easiet way to check whether a DATAPUMP dump file is corrupted or not.

##########################
#  Task 
##########################

Check Whether a DATAPUMP Export DUMPFILE is corrupted or valid

##########################
#   Use  
##########################

 Use SQLFILE Parameter to Detect Corruption 

##########################
## Solution
##########################

 impdp system/*** directory=dump_dir dumpfile=expdp.dmp logfile=corruption_check.log sqlfile=corruption_check.sql 
                                                                                                                                         
What does this sqlfile do? 

Here we have used sqlfile option, which will not import any data to the database.

This will write all DDL statements (which will be executed if a import is performed) into the file which we mentioned in the command. 

So this will read the entire DATAPUMP Export dump file and will report if a corruption is detected.