The Oracle (tm) Users' Co-Operative FAQ

The line length in the utl_file package is limited to 1023 bytes - is there a workaround ?


Author's name: Connor McDonald

Author's Email: connor_mcdonald@yahoo.com

Date written: August 13, 2001

Oracle version(s): 8.0+

The line length in the utl_file package is limited to 1023 bytes - is there a workaround ?

Back to index of questions


A change to UTL_FILE came along some time ago to allow for output lines to be up to 32k - its just that for a long time this change was not in the documentation, and even when it appeared, it was not widely publicised.

So instead of

declare
  f utl_file.file_type;
begin
  f := utl_file.fopen( 'dir', 'file', 'mode' );
end;

you can use the optional fourth parameter to control line width

declare
  f utl_file.file_type;
begin
  f := utl_file.fopen( 'dir', 'file', 'mode', nnn );
end;

where nnn is can be between 1 and 32767


Further reading: N/A


Back to top

Back to index of questions