Tag Archives: impdp

DATAPUMP EXPDP/IMPDP – TABLES EXPORT AND IMPORT

Trying to export tables from one database to another database:

Source Database:

expdp system/manager directory=TEMP tables=SCHEMA1.TABLENAME1,SCHEMA2.TABLENAME2 dumpfile=SCHEMA_TABLES.dmp logfile=expdp_SCHEMATABLES.log

Dumpfile will be created under TEMP (To finout the Path/location: select DIRECTORY_PATH from dba directories where DIRECTORY_NAME=’TEMP’)

Target Database:

Copy the file from source database to target DATA_PUMP_DIR, use above query to findout location of directory DATA_PUMP_DIR.

Make sure tablespace names in source and target database should be same, other wise use remap_tablespace to avoid the issues.

impdp system/manager directory=DATA_PUMP_DIR dumpfile=SCHEMA_TABLES.dmp logfile=impdp_SCHEMATABLES.log

In impdp command, no need to expiciltly mention tables parameter as dumpfile contains two tables. If you wish to import only one table, use TABLES parameter set to required table so that other table will not import.

 

Thank You !!

ORA-39142: incompatible version number 5.1 in dump file

PROBLEM:

Trying to export schema/tables from higher Database version 12.2.0.1.0 and import to version 12.1.0.1.0, causing following error message.

ERROR:

Import: Release 12.1.0.2.0 – Production on Wed Jun 20 05:22:35 2018

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file “xxx.dmp”

SOLUTION:

Please set parameter Version=12.1 in export command and import the data without issue.

Source Database(12.2.0.1):

expdp scott/tiger@PRIM directory=DATAPUMP tables=scott.testtb Version=12.1 dumpfile=Exp_Scott_test.dmp logfile=Exp_Scott_test.log

Target Database(12.1.0.1):

impdp scott/tiger@TEST directory=DATAPUMP tables=scott.testtb dumpfile=Exp_Scott_test.dmp logfile=Imp_Scott.log

Thank you !!