ORA-39087: directory name is invalid tipsExpert Oracle Tips by Burleson Consulting |
Question: I am getting the ORA-39087 error when running expdp:
$ expdp myschema/mypass DIRECTORY=MY_DATA_PUMP_DIRECTORY DUMPFILE=Test1.dmp logfile=Test1.log SCHEMAS=myschema
Export: Release xx.x.x.x.x - xxbit Production on Tuesday, xx xxxxxxxx, xxxx xx:xx:xx
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release xx.x.x.x.x - xxbit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name MY_DATA_PUMP_DIRECTORY is invalid
How do I correct or avoid this ORA-39087 error?
Answer: Unlike the old exp export utility, with a data pump export you must specify a default database directory in which to place dump file set and log file before you perform any export or import operation. Failure to create a directory before performing an export will result in an error.
You need to grant read, write on directory MY_DATA_PUMP_DIRECTORY to system and your myschema.
Here are the two steps you must take to prepare the directory:
- Grant “create any directory” privilege to the export/import administrator.
SQL> grant create any directory to myschema;
Grant succeeded.
- Create a directory for dump file set and log file.
SQL> create directory my_data_pump_directory as 'u01/oracle/export';
Directory created.
'Database' 카테고리의 다른 글
SQL Syntax differences between Oracle and MS-SQL (0) | 2013.06.05 |
---|---|
SQL AUTO INCREMENT Field (0) | 2013.06.05 |
(Oracle) Howto import an oracle dump in an different tablespace (0) | 2013.05.21 |
(Oracle) ALTER SYSTEM SWITCH LOGFILE vs ALTER SYSTEM ARCHIVELOG CURRENT (0) | 2013.04.23 |
Oracle flashback (0) | 2013.04.10 |