Skip to Main Content
  • Questions
  • Unable to get expdp/impdp utility run successfully, getting ORA-39002: invalid operation ORA-39070: Unable to open the log file.

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Dawood.

Asked: April 09, 2018 - 8:22 am UTC

Last updated: May 06, 2019 - 4:36 pm UTC

Version: 11g Release 11.2.0.1.0 - 64bit Production

Viewed 100K+ times! This question is

You Asked

Dear Tom,
very Good day to you.
I am trying to use expdp/impdp utility to backup tables,schema etc and it is not executing successfully.
The followings are what I am getting in regard to errors
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation


1-I have already created the directory and it does exist.
select directory_name from dba_directories;
2-I have the privilege to read and write on it.
select * from dba_tab_privs;

I guess there problem with log and dump files that cannot be opened.
3-When I execute the syntax I run it as admin
4-If if you will give me instructions to solve the problem please make sure to instruct me to execute the commands or syntax on sqlplus or cmd prompt.
Awaiting your earliest reply.
Many many thanks Tom for your help.
Dawood

and Chris said...

The database isn't able to write to the log file location. So likely your permissions are wrong or the directory is specified incorrectly.

1. Check OS-level permissions for the folder. The Oracle OS user must have permissions to write to the directory.

1a. If you're using RAC, ensure the folder for the directory exists on all nodes and the permissions are correct for all of them.

2. Ensure you can write a file to the location using utl_file:

declare
  f utl_file.file_type;
begin
  f := utl_file.fopen ('<your directory>', 'test.txt', 'w');
  utl_file.put_line(f, 'test');
  utl_file.fclose(f);
end;
/


3. If you've checked the above but still hit "Unable to open the log file" errors, try explicitly stating the logfile directory:

expdp ... logfile=export_dir:exp.log

Rating

  (5 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Answering my question

Dawood Fardan, April 22, 2018 - 7:21 am UTC

Many thanks for your answer to my question Mr.Tom. I really appreciate your helping Oracle Community.
Your answer to my question opened my mind to broader horizon in other oracle related subjects and gave me the interest to search and explore more knowledge in this field.
Bless you Mr.Tom.
Good day.
Chris Saxon
April 23, 2018 - 9:34 am UTC

It's Chris, but thanks anyway! :)

Same error, but due to bug/change

Mark Cecil, August 20, 2018 - 7:36 pm UTC

I had the exact same problem but it was due to something that happened in later versions of Oracle where UTL_FILE cannot write to a symbolic link, I changed my directory to the physical location of the folder and not use the symbolic link and datapump export worked
Connor McDonald
August 21, 2018 - 12:02 pm UTC

Thanks for the input

A reader, April 29, 2019 - 10:33 am UTC

I found I had to recreate the logical directory in oracle after I had added the OS user oracleuser to the physical OS folder (in windows).
Chris Saxon
April 29, 2019 - 11:07 am UTC

Thanks for letting us know.

physical directory

othmane, May 06, 2019 - 10:49 am UTC

please tel me what do you mean by 'physical directory'
can you give me an exemple
thanks


Connor McDonald
May 06, 2019 - 4:36 pm UTC

In unix, you can have a symbolic link to a file/folder.

So /u01/abc might really point to /u03/xyz


The latter is the physical location.

Recreate logical directory too

Alejandro, February 06, 2021 - 12:43 am UTC

I had to drop and create the logical directory and it worked fine

More to Explore

Utilities

All of the database utilities are explained in the Utilities guide.