Site icon IT Tutorial

ORA-39070: Unable to open the log file.

I got “ORA-39070: Unable to open the log file. ”  error in Oracle database.

 

ORA-39070: Unable to open the log file

 

Details of error are as follows.

#> expdp mehmet/deveci directory=datapump_dir dumpfile=full.dmp full=y logfile=full.log

Copyright (c) 2003, 2017, Oracle. All rights reserved.

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


 

 

Unable to open the log file

This ORA-39070 errors are related with the  directory object and granted read/write access to the directory.

Make sure that the /export/dump directory has 660 permission.

 

To solve this error, create or replace your directory and grant the following priviliges to user.

create directory datapump_dir as '/export/dump';
grant read,write on directory datapump_dir to mehmet;
grant datapump_exp_full_database to mehmet;
grant datapump_imp_full_database to mehmet;

 

Then now try to execute expdp command, it will work fine.

 

If you got this error on the Windows system, Follow the next steps to progress this issue:

1.  Run expdp using the following steps:

a.  Using Windows Explorer create a new directory in D drive called <OS_directory_name>
b.  Check with the Windows Explorer that the directory d:\<OS_directory_name> exists at OS level
c.  From cmd window set ORACLE_SID=<SID of your database> and within a sqlplus session execute:

connect / as sysdba
SQL> create or replace directory <directory_name> as 'd:\<OS_directory_name>';
SQL> grant read,write on directory <directory_name> to system;

2.  Execute the datapump export dump using the following command:

 

set ORACLE_SID=<SID of your database>
expdp system/<password> directory=<directory_name> dumpfile=<dump_name>.dmp full=y content=metadata_only logfile=<log_name>.log

Note: Do not use sqlnet connection for the export execution. This is only for test purposes. Run expdp using exactly with the above steps. If the issue still reproduces then please execute Step 3 to make sure there is no issue with the directory.

3.  Attempt to write a file in the <directory_name> directory using UTL_FILE Package from sqlplus in this DB.

Note:

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version