ORA-29280: invalid directory path

ORA-29280: invalid directory path

This is one common error we get while running PL/SQL procedures. Primary cause of this error is that parameter UTL_FILE_DIR is not specified in initialization file.

UTL_FILE_DIR is an initialization parameter where one or more directories are set that Oracle uses for PL/SQL file I/O.
This is static parameter. Lets see how to set this parameter.

If database uses spfile

SQL> ALTER SYSTEM SET utl_file_dir=’path1′,’path2′ SCOPE=SPFILE;

If database uses pfile

Edit the entries in pfile

utl_file_dir=’path1′
utl_file_dir=’path2′

If you list multiple values, all entries of this parameter must be on contiguous lines of the parameter file. If you separate them with other parameters, Oracle will read only the last (contiguous) lines.

This is one reason we get the ORA-29280: invalid directory path error though we had specified utl_file_dir in pfile.

Article by Divya