How to Fix ORA-39142: Incompatible Dump File Version in impdp
While working with Oracle Data Pump (expdp
/impdp
) to export and import data between different database versions, you may encounter this error during import:
ORA-39142: incompatible version number 5.1 in dump file "your_dump_01.dmp"
This happens when the dump file is exported from a newer Oracle version (e.g., 19c) and imported into an older version (e.g., 12.1) without setting a compatible metadata version.
In this post, you’ll learn why this happens, how to inspect the dump file version, and how to resolve it using the VERSION parameter — with real-world examples and commands.
Problem Scenario
Export performed on Oracle 19c (completes without error):
nohup expdp '"/ as sysdba"' DIRECTORY=your_dir DUMPFILE=your_schema_%U.dmp LOGFILE=your_schema_exp.log SCHEMAS=your_schema COMPRESSION=ALL PARALLEL=4 REUSE_DUMPFILES=Y &
Import attempted on Oracle 12.1:
nohup impdp '"/ as sysdba"' DIRECTORY=your_dir DUMPFILE=your_schema_%U.dmp LOGFILE=target_schema_imp.log REMAP_SCHEMA=your_schema:target_schema PARALLEL=4 &
Full Error (as it appears):
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "your_schema_01.dmp"
Why This Happens
Oracle embeds an internal dump file version number based on the database version used for export.
Oracle Database Version | Dump File Version |
---|---|
10.1 | 0.1 |
10.2 | 1.1 |
11.1 | 2.1 |
11.2 | 3.1 |
12.1 | 4.1 |
12.2 / 18c / 19c | 5.1 |
Oracle 12.1 cannot import version 5.1 dump files — that’s why you see the error.
How to Check the Dump File Version
Oracle provides a built-in utility to inspect dump headers, including the dump file version.
✅ Step 1: Create the utility package (run once as SYS)
@?/rdbms/admin/show_dumpfile_info.sql
This creates the SYS.SHOW_DUMPFILE_INFO
procedure.
You don’t need to download anything — this script is already included in Oracle installations.
✅ Step 2: Run the dump file inspection command
SET SERVEROUTPUT ON
EXEC SYS.SHOW_DUMPFILE_INFO('your_dir', 'your_schema_01.dmp');
Sample Output:
SQL> SET SERVEROUTPUT ON
SQL> EXEC SYS.SHOW_DUMPFILE_INFO('your_dir','your_schema_01.dmp');
----------------------------------------------------------------------------
Purpose..: Obtain details about export dumpfile. Version: 24-JUN-2025
Required.: RDBMS version: 10.2.0.1.0 or higher
. Export Data Pump dumpfile version: 10.1.0.1.0 or higher
Usage....: execute show_dumpfile_info('DIRECTORY', 'DUMPFILE');
Example..: exec show_dumpfile_info('MY_DIR', 'expdp_s.dmp')
----------------------------------------------------------------------------
Filename.: your_schema_01.dmp
Directory: your_dir
Disk Path: /u01/dumps
Filetype.: 1 (Export Data Pump dumpfile)
----------------------------------------------------------------------------
...Database Job Version..........:
...Internal Dump File Version....: 5.1 (Oracle19c Release) <-- ❗️ Important
...Creation Date.................: Mon Jun 24 08:55:56 2025
...File Number (in dump file set): 1
...Master Present in dump file...: 1 (Yes)
...Job Name......................: "SYS"."SYS_EXPORT_SCHEMA_01"
...GUID (unique job identifier)..: 46BDA47EBD1076AEE053941315ACE706
...Block size dump file (bytes)..: 4096
...Metadata Compressed...........: 1 (Yes)
...Data Compressed...............: 0 (No)
----------------------------------------------------------------------------
PL/SQL procedure successfully completed.
From this, you can confirm the dump file version (5.1
) and whether it’s compatible with your target DB.
✅ The Fix: Use VERSION Parameter During Export
To make the dump compatible with Oracle 12.1, export using the appropriate VERSION
:
nohup expdp '"/ as sysdba"' DIRECTORY=your_dir DUMPFILE=your_schema_%U.dmp LOGFILE=your_schema_exp.log SCHEMAS=your_schema COMPRESSION=ALL PARALLEL=4 REUSE_DUMPFILES=Y VERSION=12.1 &
Then import normally:
nohup impdp '"/ as sysdba"' DIRECTORY=your_dir DUMPFILE=your_schema_%U.dmp LOGFILE=target_schema_imp.log REMAP_SCHEMA=your_schema:target_schema PARALLEL=4 &
✅ This ensures the exported dump uses metadata version 4.1, which is compatible with Oracle 12.1.
Summary: When to Use VERSION
Source DB | Target DB | Use VERSION ? |
---|---|---|
19c | 12.1 | ✅ Yes — VERSION=12.1 |
18c | 11.2 | ✅ Yes — VERSION=11.2 |
12.2 | 12.1 | ✅ Yes — VERSION=12.1 |
12.1 | 12.1+ | ❌ No |
Lower → Higher | ❌ No |
Final Notes
- The
ORA-39142
error occurs only during import, not export. VERSION
controls metadata structure, not actual data content.- Always match
VERSION
to the lowest version between source and target. - Use
SHOW_DUMPFILE_INFO
to verify dump compatibility before running imports in production.