Why do I get ORA-39001: invalid argument value when I try to impdp in Oracle 12c?

Sam picture Sam · May 5, 2016 · Viewed 44.9k times · Source

When I run this command in Oracle 12c SE2:

impdp system/Oracle_1@pdborcl directory=DATA_PUMP_DIR dumpfile=mydb.dmp nologfile=Y

I get this:

ORA-39001 : invalid argument value

ORA-39000 : bad dump file specification

ORA-39088 : directory name DATA_PUMP_DIR is invalid

We used to import this into 11g all the time.

How can I solve these errors?

Answer

Alex Poole picture Alex Poole · May 5, 2016

From the 12c documentation:

Be aware of the following requirements when using Data Pump to move data into a CDB:
...

  • The default Data Pump directory object, DATA_PUMP_DIR, does not work with PDBs. You must define an explicit directory object within the PDB that you are exporting or importing.

You will need to define your own directory object in your PDB, which your user (system here) has read/write privileges against.

create directory my_data_pump_dir as 'C:\app\OracleHomeUser1\admin\orcl\dpdump';
grant read, write on directory my_data_pump_dir to system;

It can be the same operating system directory that DATA_PUMP_DIR points to, you just need a separate directory object. But I've used the path you said you'd prefer, from a comment on a previous question.

Then the import is modified to have:

... DIRECTORY=my_data_pump_dir DUMPFILE=mydb.dmp