ORA-39002: invalid operation

I got ” ORA-39002: invalid operation ”  error in Oracle database.

 

ORA-39002: invalid operation

 

Details of error are as follows.

[oracle@msdbadm01 ~]$ expdp mehmet/deveci DIRECTORY=datapump_dir DUMPFILE=mehmet.dmp logfile=mehmet.log schemas=mehmet

With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

ORA-39002: invalid operation

ORA-39070: Unable to open the log file.

ORA-39087: directory name datapump_dir is invalid


 

 

invalid operation

This ORA-39002 error is related with the read, write access to the directory or existing of directory.

 

1. The Data Pump Export can fail with the following errors:

#> expdp system/<password> directory=<directory_name> dumpfile=<dump_name>.dmp logfile=<log_name>.log

Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 05 March, 2009 10:43:55

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production with the
Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options

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

 

 

2. DataPump export fails with same errors even after dropping and re-creating the DataPump utility and re-creating the directory.

Can report the following errors when attempt to run a datapump export

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

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:

  • After changing the file ownerships/permissions etc. the database and listener should be bounced so that they correctly read the updated changes.
  • When EXPDP is calling the UTL_FILE pkg, there isn’t a way to know that the problem is related to the temp file until you run the export with the FULL=y and CONTENT=METADATA_ONLY parameters.”

 

 

 

 

 

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

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

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *