My Oracle Support Banner

UTL_FILE.PUT_LINE Results In UTL_FILE.WRITE_ERROR Although Max Line Size Is Less Than 1023 Bytes (Doc ID 255888.1)

Last updated on JULY 03, 2023

Applies to:

PL/SQL - Version 8.0.6.0 and later
Information in this document applies to any platform.

Symptoms

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.


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.


Changes

Changing the character set in the NLS_LANG for the session to a value that is different from the database character set.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.