{"id":4392,"date":"2025-06-26T05:10:17","date_gmt":"2025-06-26T05:10:17","guid":{"rendered":"https:\/\/w3buddy.com\/?p=4392"},"modified":"2026-01-15T12:44:10","modified_gmt":"2026-01-15T07:14:10","slug":"how-to-fix-ora-39142-incompatible-dump-file-version-in-impdp","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/how-to-fix-ora-39142-incompatible-dump-file-version-in-impdp\/","title":{"rendered":"How to Fix ORA-39142: Incompatible Dump File Version in impdp"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">While working with Oracle Data Pump (<code>expdp<\/code>\/<code>impdp<\/code>) to export and import data between different database versions, you may encounter this error <strong>during import<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>ORA-39142: incompatible version number 5.1 in dump file \"your_dump_01.dmp\"\n<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This happens when the dump file is exported from a <strong>newer Oracle version<\/strong> (e.g., 19c) and imported into an <strong>older version<\/strong> (e.g., 12.1) without setting a compatible metadata version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you\u2019ll learn <strong>why this happens<\/strong>, how to <strong>inspect the dump file version<\/strong>, and how to <strong>resolve it using the VERSION parameter<\/strong> \u2014 with real-world examples and commands.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Problem Scenario<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Export performed on Oracle 19c (completes without error):<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>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 &amp;\n<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Import attempted on Oracle 12.1:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>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 &amp;\n<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Full Error (as it appears):<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>ORA-39001: invalid argument value\nORA-39000: bad dump file specification\nORA-39142: incompatible version number 5.1 in dump file \"your_schema_01.dmp\"<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Why This Happens<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle embeds an internal <strong>dump file version number<\/strong> based on the database version used for export.<\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Oracle Database Version<\/th><th>Dump File Version<\/th><\/tr><\/thead><tbody><tr><td>10.1<\/td><td>0.1<\/td><\/tr><tr><td>10.2<\/td><td>1.1<\/td><\/tr><tr><td>11.1<\/td><td>2.1<\/td><\/tr><tr><td>11.2<\/td><td>3.1<\/td><\/tr><tr><td>12.1<\/td><td>4.1<\/td><\/tr><tr><td>12.2 \/ 18c \/ 19c<\/td><td>5.1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle <strong>12.1 cannot import version 5.1<\/strong> dump files \u2014 that\u2019s why you see the error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Check the Dump File Version<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle provides a built-in utility to inspect dump headers, including the dump file version.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Step 1: Create the utility package (run once as SYS)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>@?\/rdbms\/admin\/show_dumpfile_info.sql\n<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This creates the <code>SYS.SHOW_DUMPFILE_INFO<\/code> procedure.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">You don\u2019t need to download anything \u2014 this script is already included in Oracle installations.<\/p>\n<\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Step 2: Run the dump file inspection command<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SET SERVEROUTPUT ON\nEXEC SYS.SHOW_DUMPFILE_INFO('your_dir', 'your_schema_01.dmp');<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Sample Output:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>SQL> SET SERVEROUTPUT ON\nSQL> EXEC SYS.SHOW_DUMPFILE_INFO('your_dir','your_schema_01.dmp');\n----------------------------------------------------------------------------\nPurpose..: Obtain details about export dumpfile. Version: 24-JUN-2025\nRequired.: RDBMS version: 10.2.0.1.0 or higher\n. Export Data Pump dumpfile version: 10.1.0.1.0 or higher\nUsage....: execute show_dumpfile_info('DIRECTORY', 'DUMPFILE');\nExample..: exec show_dumpfile_info('MY_DIR', 'expdp_s.dmp')\n----------------------------------------------------------------------------\nFilename.: your_schema_01.dmp\nDirectory: your_dir\nDisk Path: \/u01\/dumps\nFiletype.: 1 (Export Data Pump dumpfile)\n----------------------------------------------------------------------------\n...Database Job Version..........:\n...Internal Dump File Version....: 5.1 (Oracle19c Release)   &lt;-- \u2757\ufe0f Important\n...Creation Date.................: Mon Jun 24 08:55:56 2025\n...File Number (in dump file set): 1\n...Master Present in dump file...: 1 (Yes)\n...Job Name......................: \"SYS\".\"SYS_EXPORT_SCHEMA_01\"\n...GUID (unique job identifier)..: 46BDA47EBD1076AEE053941315ACE706\n...Block size dump file (bytes)..: 4096\n...Metadata Compressed...........: 1 (Yes)\n...Data Compressed...............: 0 (No)\n----------------------------------------------------------------------------\nPL\/SQL procedure successfully completed.<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">From this, you can confirm the dump file version (<code>5.1<\/code>) and whether it\u2019s compatible with your target DB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 The Fix: Use VERSION Parameter During Export<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To make the dump compatible with Oracle 12.1, export using the appropriate <code>VERSION<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>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 <strong>VERSION=12.1<\/strong> &amp;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then import normally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>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 &amp;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 This ensures the exported dump uses <strong>metadata version 4.1<\/strong>, which is compatible with Oracle 12.1.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Summary: When to Use VERSION<\/h3>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Source DB<\/th><th>Target DB<\/th><th>Use <code>VERSION<\/code>?<\/th><\/tr><\/thead><tbody><tr><td>19c<\/td><td>12.1<\/td><td>\u2705 Yes \u2014 <code>VERSION=12.1<\/code><\/td><\/tr><tr><td>18c<\/td><td>11.2<\/td><td>\u2705 Yes \u2014 <code>VERSION=11.2<\/code><\/td><\/tr><tr><td>12.2<\/td><td>12.1<\/td><td>\u2705 Yes \u2014 <code>VERSION=12.1<\/code><\/td><\/tr><tr><td>12.1<\/td><td>12.1+<\/td><td>\u274c No<\/td><\/tr><tr><td>Lower \u2192 Higher<\/td><td><\/td><td>\u274c No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Final Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>ORA-39142<\/code> error occurs <strong>only during import<\/strong>, not export.<\/li>\n\n\n\n<li><code>VERSION<\/code> controls <strong>metadata structure<\/strong>, not actual data content.<\/li>\n\n\n\n<li>Always match <code>VERSION<\/code> to the <strong>lowest version<\/strong> between source and target.<\/li>\n\n\n\n<li>Use <code>SHOW_DUMPFILE_INFO<\/code> to verify dump compatibility before running imports in production.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>While working with Oracle Data Pump (expdp\/impdp) to export and import data between different database versions, you may encounter this error during import: 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, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-4392","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=4392"}],"version-history":[{"count":3,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4392\/revisions"}],"predecessor-version":[{"id":4397,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4392\/revisions\/4397"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=4392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=4392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=4392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}