[database] How to change Oracle default data pump directory to import dumpfile?

I'm using impdp to import a backup. But I want change default directory dumpfile.

$ impdp system/password@$ORACLE_SID schemas=USER_SCHEMA dumpfile=mydumpfile.dmp logfile=impdpmydumpfile.log

Import: Release - Production on Mon Mar 16 09:32:05 2015

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

Connected to: Oracle Database 11g Release - 64bit Production
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "/u01/app/oracle/admin/mydatabase/dpdump/mydumpfile.dmp" for read
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

This question is related to database oracle impdp

The answer is

With the directory parameter:

impdp system/password@$ORACLE_SID schemas=USER_SCHEMA directory=MY_DIR \
  dumpfile=mydumpfile.dmp logfile=impdpmydumpfile.log

The default directory is DATA_PUMP_DIR, which is presumably set to /u01/app/oracle/admin/mydatabase/dpdump on your system.

To use a different directory you (or your DBA) will have to create a new directory object in the database, which points to the Oracle-visible operating system directory you put the file into, and assign privileges to the user doing the import.

Similar questions with database tag:

Similar questions with oracle tag:

Similar questions with impdp tag: