debugMinor
Oracle Export using EXPDP gives ORA-06512 SYS.UTL_FILE error on Windows 7
Viewed 0 times
utl_fileerror06512givesorausingexportsyswindowsoracle
Problem
I am using Oracle 11g and want to export a table using below statement
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:\Users\osman\Desktop\Export'
So why am I getting this error?
C:\>expdp SYS/sys@MYDATABASE DIRECTORY = Mydir DUMPFILE = Customer.dmp LOGFILE = Customer.log TABLES = PERSON.CUSTOMERAfter this statement cmd is giving this
UDE-28009: operation generated ORACLE error 28009
ORA-28009: connection as SYS should be as SYSDBA or SYSOPERI proceeded with
Username: SYS@SMSPSETUP AS SYSDBA
Password:And finally I got
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 operationI have created directory 'Mydir' as below
SQL>CREATE DIRECTORY Mydir AS 'C:\Users\osman\Desktop\Export';And gave everyone full privileges to this folder from the windows folder system.
When run the below statement:
select directory_name, directory_path from dba_directories; where directory_name='Mydir';I can see the path 'C:\Users\osman\Desktop\Export'
So why am I getting this error?
Solution
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:
Replaced:
CREATE OR REPLACE DIRECTORY dpump_dir AS 'C:\Data\SID'With:
CREATE OR REPLACE DIRECTORY dpump_dir AS 'C:\Data\SID\'Code Snippets
CREATE OR REPLACE DIRECTORY dpump_dir AS 'C:\Data\SID'CREATE OR REPLACE DIRECTORY dpump_dir AS 'C:\Data\SID\'Context
StackExchange Database Administrators Q#71635, answer score: 5
Revisions (0)
No revisions yet.