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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sam
  • 4,766
  • 11
  • 50
  • 76

1 Answers1

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 
Alex Poole
  • 183,384
  • 11
  • 179
  • 318
  • 2
    Thank you! It worked. You are truly a life saver. It's nice to finally see the familiar processing happening on screen from impdp. – Sam May 05 '16 at 14:52
  • Excuse the clueless follow-up question, but how do I know if I'm dealing with a [CDB](https://docs.oracle.com/database/121/CNCPT/glossary.htm#GUID-135FF536-DE9B-40CF-9F42-C246762BD77F) or a non-CDB? For example, you seemed to be able to tell here that the OP was using a CDB. – osullic Jul 08 '20 at 23:54
  • @osullic - 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](https://www.carajandb.com/en/blog/2017/help-where-am-i-cdb-or-pdb-and-which-db-anyway/)? – Alex Poole Jul 09 '20 at 12:54