ORA-39142: incompatible version number 5.1 in dump file
ORA-39142: incompatible version number 5.1 in dump file.
Recently I came across one issue while importing schema dump in 12c database.
My Scenario.
Schema Export taken from Database version 12.2.0.1.0
Schema Import needs to be done on Database version 12.1.0.1.0
While doing import to 12.1, I have received following error and import terminated.
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "/opt/dump/db_dump.dmp"
Further analysis.
As above error shows that there is some incompatibility with the versioning of Database and Dump File version.
Here are some facts as per oracle Doc related to DB versioning and Dump file compatibility.
Data Pump dumpfile compatibility
Export From Source Database With COMPATIBLE | 10.1.0.x.y | 10.2.0.x.y | 11.1.0.x.y | 11.2.0.x.y | 12.1.0.x.y | 12.2.0.x.y |
10.1.0.x.y | - | - | - | - | - | - |
10.2.0.x.y | VERSION=10.1 | - | - | - | - | - |
11.1.0.x.y | VERSION=10.1 | VERSION=10.2 | - | - | - | - |
11.2.0.x.y | VERSION=10.1 | VERSION=10.2 | VERSION=11.1 | - | - | - |
12.1.0.x.y | VERSION=10.1 | VERSION=10.2 | VERSION=11.1 | VERSION=11.2 | - | - |
12.2.0.x.y | VERSION=10.1 | VERSION=10.2 | VERSION=11.1 | VERSION=11.2 | VERSION=12.1 | - |
Data Pump client/server compatibility.
Connecting to Database version | ||||||
expdp and impdp client version | 10gR1 10.1.0.x | 10gR2 10.2.0.x | 11gR1 11.1.0.x | 11gR2 11.2.0.x | 12cR1 12.1.0.x | 12cR2 12.2.0.x |
10.1.0.x | supported | supported | supported | supported | supported | supported |
10.2.0.x | no | supported | supported | supported | supported | supported |
11.1.0.x | no | no | supported | supported | supported | supported |
11.2.0.x | no | no | no | supported | supported | supported |
12.1.0.x | no | no | no | no | supported | supported |
12.2.0.x | no | no | no | no | no | supported |
Solution To above problem.
While taking export from higher version of DB i.e. 12.2.0.1.0 use version parameter in expdp command.
Example
expdp sys/oracledba@crm directory=EXPIMP schemas=scott Version=12.1 dumpfile=Exp_Scott.dmp logfile=Exp_Scott.log
Now, you can import schema without any error.
impdp sys/oracledba@MDM directory=EXPIMP schemas=scott dumpfile=Exp_Scott.dmp logfile=Imp_Scott.log