SYS.UTL_FILE write error

ARRRRGGGGGHHHHHHHHHH!!!!!!!!! I feel better for that now.

I have just spent the last hour trying to figure this oooohhhhh so simple problem out.

I and using Oracles UTL_FILE plsql packages to write files out to a directory.


So you create the directory on the Oracle server

mkdir /u12/transfer


You go through the norm of creating said directory in Oracle

create or replace directory TRANSFER as '/u12/transfer'
grant read, write on directory transfer to XXX;

When you try to write to the directory you get

ERROR at line x:
ORA-29283: invalid file operation
ORA-06512: at “SYS.UTL_FILE”, line xxx
ORA-29283: invalid file operation

Well the fix is easy when you know how. You have to make the Linux directory globally read and writeable

chmod 777 /u12/transfer


Easy when you know how 🙂





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s