I am using Oracle 11g and want to export a table using below statement
ORA-39002: invalid operation. ORA-39070: Unable to open the log file. ORA-39087: directory name DPUMPDIR is invalid Solution: Check the directory is exists or not, If not exist then create the directory with proper path: CREATE OR REPLACE DIRECTORY DPUMPDIR AS '/holding/dpump'. I do guess that datapump tries to create implicitly a log file for the. ORA-39002: invalid operation. ORA-39070: Unable to open the log file.
After this statement cmd is giving this
I proceeded with
And finally I got
I have created directory 'Mydir' as below
And gave everyone full privileges to this folder from the windows folder system.
When run the below statement:
I can see the path 'C:UsersosmanDesktopExport'
So why am I getting this error?
osmanosman28333 gold badges77 silver badges1515 bronze badges
6 Answers
I just wanted to chime in and share what got me past this error. In my case (Ora 11.2.0.3 on Win 7) I found I needed the trailing ' in my directory path.
Replaced:
With:
KenKen
Firstly, the oracle docs are VERY clear that you shouldn't use data pump as SYS:
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL824:
Do not invoke Export as SYSDBA, except at the request of Oracle technical support
The problem will almost certainly be permissions related. The user that is running the Oracle database is the user that attempts to write to the file, so check that user can write to the folder in question (and can access it through all the parent folders).
Perhaps create a folder in the root of a drive (e.g. 'E:TestExport' or similar) so that you have fewer parent folders to worry about, then use this within Oracle to determine if this is the case.
Phil SumnerPhil Sumner
check the file permissions because the export is done by oracle user whereas the directory belongs to osman user
Cyryl1972Cyryl1972
Yeah, I found the solution. It is because my oracle database is located on another computer on the network. So, when I try to export to like 'c:' directory, oracle is trying to export to its own C: directory not mine.
I used network address of the folder as export directory and the problem was solved.Use for example
osmanosman28333 gold badges77 silver badges1515 bronze badges
oracle SQL statement 'CREATE DIRECTORY Mydir AS 'C:UsersosmanDesktopExport';' can't create any direcotry on Windows or Linux, it's just a mapping between variable Mydir and directory 'C:UsersosamnDesktopExport'
so you need to make sure your windows has 'C:UsersosmanDesktopExport'
hope this can help you !
LawrenceLiLawrenceLi
in addition to the above, you may also encounter the following (on windows) :
- Go to services.
- Search for 'OracleService'
- Right Mouse Click -> properties -> Log On (Tab)
- Change this account (current user name) -> to a more privileged one (of course you can change the current user privileges as well)
- Restart the service and it should work.
Etay GudaiEtay Gudai
Not the answer you're looking for? Browse other questions tagged oracleoracle-11gexport or ask your own question.
I am using data pump to perform an import on 4 .dmp files and keep on receiving the set of errors as below:
I am new to oracle and cannot find a helpful solution.
I am performing the import as in here, although I'm using oracle 12c.
The command I run in the windows command like looks like this:
DUMP_DIR is created in oracle and appropriate privs were granted.
I also ran this command with
added at the end but I'm not sure if the log file was created or where it was saved.
I have found this - it's about exactly the same set of errors but on export and on linux. At the end of the answer there's a sentence 'If we are on a Windows machine, then we need to make sure that both the listener and the database have been started with the exact same username.' Is this useful in case of import? If yes - what does it mean exactly?
abcdabcd
2 Answers
There's a great short answer here, which is basically 'The database isn't able to write to the log file location.'
The link above suggests a simple test to troubleshoot the issue.
If this fails, Oracle can't write to that directory at all, probably because of Windows file permissions. Check which Windows user(s) the Oracle services are running as, and change the folder permissions to allow them write access.
If that worked, it's a problem specific to impdp. You might try changing your command string - one option might be to specifically write your log file to a different Oracle directory, e.g.
logfile=DATA_PUMP_DIR:file_name.log
. If none of these options work, you can also disable the logfile completely by using
kfinitykfinityNOLOGFILE=Y
, but you'll have to monitor the impdp output on your console, because it won't get saved anywhere else.3,84911 gold badge77 silver badges1414 bronze badges
The problem You have is Your Oracle is not able to write to DIRECTORY (DUMP_DIR) you specified. In Windows 10, It behaves unpredictably. Solution
- Create another Oracle directory with preferably in C:UsersPublic folder, where you are 100% sure access would not be issue.
CREATE OR REPLACE DIRECTORY DUMP_DIR_2 AS 'C:UsersPublic<name>
- Give Grants
GRANT READ, WRITE ON DIRECTORY DUMP_DIR_2 TO schema_name;
- Copy your dump file to newly created folder.
- Fire your import command
Susil ParidaSusil Parida