ORA-29283: Invalid File Operation (Doc ID 298700.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 9.2.0.6 and later
Information in this document applies to any platform.
***Checked for relevance on 16th May 2016***

Symptoms

Although the following Note illustrates one error it will discuss a few possible causes.

To run the sample, a directory alias needs to be created

SQL> CREATE DIRECTORY NOTE_TEST AS 'C:/FileStore';

Directory created.

The following anonymous block is used to generate the error in one of many ways which means that although the code may not match other code, the error generated can be the same.

SQL> DECLARE
   input_file utl_file.file_type;
   input_buffer varchar2(10000);
BEGIN
   input_file := utl_file.fopen ('NOTE_TEST', 'TestFile.txt', 'r');
   utl_file.get_line (input_file,input_buffer);
   utl_file.fclose(input_file);
END;
/

DECLARE
*
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
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