Last updated on MAY 15, 2016
Applies to:PL/SQL - Version 184.108.40.206 and later
Information in this document applies to any platform.
***Checked for relevance on 16th May 2016***
In certain cases using UTL_FILE.PUT_LINE to write to an Operating System file, where each call to PUT_LINE writes no more than 1023 bytes, fails with a UTL_FILE.WRITE_ERROR exception.
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 171
ORA-06512: at "SYS.UTL_FILE", line 1093
ORA-06512: at line 12
You can sometimes work around this by specifying a large line size in the call to UTL_FILE.FOPEN as shown in the following:
However, since the issue is that UTL_FILE is failing to recognize the line separator character, it may not be possible to set the value high enough to avoid the error.
Changing the character set in the NLS_LANG for the session to a value that is different from the database character set.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms