"ORA-29283: Invalid File Operation" when a File is Opened in Byte (RB, WB or AB) Mode

(Doc ID 2345345.1)

Last updated on JANUARY 12, 2018

Applies to:

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

Symptoms

 When a file is opened for read, write or append in byte mode using the PL/SQL package UTL_FILE, e.g.:

f := UTL_FILE.FOPEN( 'TEST_DIR', 'testfile.txt', 'wb' );

the following UTL_FILE routines:

FGETPOS
FSEEK
GET_LINE
GET_LINE_NCHAR
NEW_LINE
PUT
PUTF
PUTF_NCHAR
PUT_LINE
PUT_LINE_NCHAR
PUT_NCHAR

cause the PL/SQL block to fail with:

ORA-29283: invalid file operation

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms