Google it ....

Showing posts with label ORA-39142: incompatible version number 5.1 in dump file. Show all posts
Showing posts with label ORA-39142: incompatible version number 5.1 in dump file. Show all posts

Wednesday, April 10, 2019

ORA-39142: incompatible version number 5.1 in dump file

Recently I faced error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file 
while making import table data on Oracle Database 11g.

Dump file was made from Oracle Database 12c (12.2.0.1.0) with parameter compatible to 12.2.0
SQL> show parameter compatible
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.2.0
noncdb_compatible                    boolean     FALSE
 
SQL> 

and during impdp on Oracle Database 11g (11.2.0.4.0) with compatible parameter to 11.2.0.4.0 occurred error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "xxx.dmp"

Data Pump Import can always read Data Pump dump file sets created by older releases of the database but In a downgrade situation, when the target release of a Data Pump-based migration is lower than the source, the VERSION parameter should be explicitly specified to be the same version as the target. An exception is when the target release version is the same as the value of the COMPATIBLE initialization parameter on the source system; then VERSION does not need to be specified. In general however, Data Pump import cannot read dump file sets created by an Oracle release that is newer than the current release unless the VERSION parameter is explicitly specified
So solution is to specify value of target database compatible parameter in version parameter in expdp while exporting table.

for my situation on expdp on 12c database I specify version=11.2 and impdp on 11g run successfully.

on Oracle Database 12c (12.2.0.1.0) with compatible 12.2.0
expdp test_user/test_pass version=11.2 tables=test_table CONTENT=DATA_ONLY directory=TEST_DUMP dumpfile=test.dmp logfile=test_exp.log

on Oracle Database 11g (11.2.0.4.0) with compatible 11.2.0.4.0
impdp test_user/test_pass tables=test_table CONTENT=DATA_ONLY directory=TEST_DUMP dumpfile=test.dmp logfile=test_imp.log