Why is UTL_FILE.FOPEN failing?

From: PeteOlcott <peteolcott_at_gmail.com>
Date: Thu, 12 Apr 2012 08:16:21 -0700 (PDT)
Message-ID: <87ce2ab3-2927-4e7e-9955-891006505516_at_2g2000yqp.googlegroups.com>



INPUT:
create or replace directory filesdir as 'c:\'; grant read on directory filesdir to public;

declare
 namesfile UTL_FILE.FILE_TYPE;
begin

  • Syntax : FOPEN ( directory alias, filename, open mode) namesfile := UTL_FILE.FOPEN('FILESDIR','CASELIST.TXT','r'); end;

OUTPUT: SQL> create or replace directory filesdir as 'c:\';

Directory created.

SQL> grant read on directory filesdir to public;

Grant succeeded.

SQL>
  1 declare
  2 namesfile UTL_FILE.FILE_TYPE;
  3 begin
  4 -- Syntax : FOPEN ( directory alias, filename, open mode)   5 namesfile := UTL_FILE.FOPEN('FILESDIR','CASELIST.TXT','r');   6* end;
  7 /
declare
*
ERROR at line 1:

ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 488
ORA-29283: invalid file operation
ORA-06512: at line 5
Received on Thu Apr 12 2012 - 10:16:21 CDT

Original text of this message