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

1

6

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?

Oech answered 5/5, 2016 at 14:23 Comment(0)
C
9

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 
Cooperman answered 5/5, 2016 at 14:35 Comment(3)
Thank you! It worked. You are truly a life saver. It's nice to finally see the familiar processing happening on screen from impdp.Oech
Excuse the clueless follow-up question, but how do I know if I'm dealing with a CDB or a non-CDB? For example, you seemed to be able to tell here that the OP was using a CDB.Froward
@Froward - partly from the error, since it's a default directory name; but mostly because the TNS alias pdborcl suggested it was a PDB *8-) More generally... well, depends how and where you're looking. This might be helpful?Cooperman

© 2022 - 2024 — McMap. All rights reserved.