Thursday 28 February 2019

IMP-00010: not a valid export file, header failed verification - ERROR during oracle database schema import


Hi Everyone,

This is one of the error which I received while trying to import database dump exported from another oracle database version as part of migration activities. It took me some time to work out the things -

Error Received during import of schema: 

                          IMP-00010: not a valid export file, header failed verification

Schema dump exported from oracle version:

                          V12.01.00

Schema dump imported into oracle version:

                           V11.02.00

 From oracle note available in web:
                           If you are running Oracle Database 12c Release 1 (12.1.0.2) and specify VERSION=11.2 on an export, then the dump file set that is created can be imported into an Oracle 11.2 database.

It means I must redo the export again which I cannot afford due to some time constraints.

Quick and dirty resolution I work out which works:

 1. First I checked the content of the DMP file with the help of some commands, then I noticed there is one line with the version number inside of DMP file. If you can execute Unix commands, then try 
                       head -5 {dump_file_name}.DMP

Result shows like below -

                       gEXPORT:V12.01.00 

 2. I replaced the line with version of the target oracle instance by below command-

                       sed 's/gEXPORT:V12.01.00/gEXPORT:V11.02.00/' {dump_file_name}.DMP > {dump_file_name}_new.DMP


3. Then try to import the new DMP file i.e. {dump_file_name}_new.DMP and guess what?

It successfully imported into new schema. Do let me know if it helps you. 😊


Make life easier — Git automation with single command file

Make life easier — Git automation with single command file Posted on medium #makelifeeasier series - Automation of git related activity...