Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Thursday, 24 May 2012

ORA-39070: Unable to open the log file (Datapump Error)

While working with datapump found the following error. Trying several times i found it is working fine with the default directory but failed with the directory i created today.
impdp dumpfile=EXP_ORCL3_23052012.dmp directory=SHAHID_DIR logfile=EXP_ORCL3_23052012.log job_name=EXP ignore=y

ORA-39002: invalid operation
ORA-39070: Unable to open the log file
ORA-29283: invalid file operation
ORA-06512: at “SYS.UTL_FILE”, line 312
ORA-29283: invalid file operation

I checked the parfile which specified the SHAHID_DIR  also check the writes, permission are granted to the user. Initially i did not understand what is the reason behind this error. I repeated all these process and now it is working fine. Actually, it is somewhere related to permission issues or due to mismatch of the steps performed during import operation.

SQL> Select directory_name, directory_path from dba_directories where directory_name like '%SHAHID_DIR%';
I issued the following statement to get the proper directory path added to dba_directories:
SQL> create or replace directory SHAHID_DIR as 'D:\backup\export';
SQL> grant read, write on directory SHAHID_DIR to HRMS;

I dig more go thruogh the datapump column and came to know this error is because the impdp can not write the log file to the currsponding log file location.
In this situation you have to check following things:
- Find out the curresponding direcotory from the dba_directories view and check whether the directory physically present in the file system.
- Check whether enough permissions (READ & WRITE) are granted to the user who is performing the import. Suppose if you are performing the import using HRMS user, you can use this command to give the permissions AS: GRANT READ, WRITE ON SHAHID_DIR TO HRMS;
- OS level: Check the oracle user has the write, read access on the directory mentioned in the impdp.


  1. This post helped me to resolve the same problem I faced in 2017!, thanks a lot. - Mehedi