Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

what is the maximum length of 'file_name' supported by UTL_FILE?

SEDWARDSNov 4 2009 — edited Nov 4 2009
Trying to use utl_file.fopen() to open a file for reading. Using buffer size of 32k.

FILETEST is the directory name:
create directory filetest as '/dba_files/scripts/compression_test/load/data';

This works:

filehan := utl_file.fopen('FILETEST','20090821/252328310010/blah.txt','r',32767);

This doesn't:

filehan := utl_file.fopen('FILETEST','20090821/252328310010/252328310010_200908211125_S01_CGH_105_Dec08_1_1.txt','r',32767);

The longer file name generates an 'Invalid File Operation' error.

Is there some arbitrary limit to the length of the file name parameter? File names are generated by an external system, and each piece of the file name is used for some supernaturally complicated purpose (I don't ask, I just write the code...).

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2009
Added on Nov 4 2009
2 comments
644 views