Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> utl_file.fopen with "Append/Write" option

utl_file.fopen with "Append/Write" option

From: Muthu Kumar G <g.muthukumar_at_gmail.com>
Date: 16 Nov 2005 04:57:55 -0800
Message-ID: <1132145875.229979.123100@g47g2000cwa.googlegroups.com>


create or replace directory my_out as '/export/home/mig10g/muthuk';

grant read, write on directory my_out to public;

SQL> create or replace procedure utl_file_test_read   2 authid current_user
  3 as
  4 input_file utl_file.file_type;
  5 begin
  6 input_file := utl_file.fopen ('MY_OUT','abcd.log','A');

  7  utl_file.fclose(input_file);
  8  dbms_output.put_line('abc');
  9  utl_file.fclose(input_file);

 10 exception
 11 when others then
 12 dbms_output.put_line('errm -> ' || sqlerrm);  13 end utl_file_test_read;
 14 /

Procedure created.

SQL> exec utl_file_test_read
errm -> ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line
33
ORA-06512: at "SYS.UTL_FILE", line 460
ORA-29283: invalid file operation

PL/SQL procedure successfully completed.

SQL> Hi, i would like to know that what would be the possible error. - Muthu Kumar PG. Received on Wed Nov 16 2005 - 06:57:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US