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 -> getting error on UTL_FILE.FOPEN

getting error on UTL_FILE.FOPEN

From: <g.muthukumar_at_gmail.com>
Date: 10 Nov 2005 01:28:39 -0800
Message-ID: <1131614919.275947.266570@z14g2000cwz.googlegroups.com>


Hi,
I would like anyone to help me out in this UTL_FILE issue...

SQL> CREATE OR REPLACE PROCEDURE UTL_FILE_TEST_READ   2 IS
  3 INPUT_FILE UTL_FILE.FILE_TYPE;   4 BEGIN

  5     INPUT_FILE := UTL_FILE.FOPEN ('C:\','123.log','R');
  6     DBMS_OUTPUT.PUT_LINE('123');
  7     UTL_FILE.FCLOSE(INPUT_FILE);

  8 EXCEPTION
  9 WHEN OTHERS THEN
 10 DBMS_OUTPUT.PUT_LINE('ERRM -> ' || SQLERRM);  11 END UTL_FILE_TEST_READ;
 12 /

Procedure created.

SQL> EXEC UTL_FILE_TEST_READ;
ERRM -> ORA-29280: invalid directory path

PL/SQL procedure successfully completed.

SQL> <-------------- OR ---------->

SQL> CREATE OR REPLACE DIRECTORY MY_OUT AS 'C:\'; Directory created.

SQL> CREATE OR REPLACE PROCEDURE UTL_FILE_TEST_READ   2 IS
  3 INPUT_FILE UTL_FILE.FILE_TYPE;   4 BEGIN

  5     INPUT_FILE := UTL_FILE.FOPEN ('MY_OUT','123.log','R');
  6     DBMS_OUTPUT.PUT_LINE('123');
  7     UTL_FILE.FCLOSE(INPUT_FILE);

  8 EXCEPTION
  9 WHEN OTHERS THEN
 10 DBMS_OUTPUT.PUT_LINE('ERRM -> ' || SQLERRM);  11 END UTL_FILE_TEST_READ;
 12 /

Procedure created.

SQL> EXEC UTL_FILE_TEST_READ;
ERRM -> ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line
475
ORA-29283: invalid file operation

PL/SQL procedure successfully completed.

SQL> Please HELP....

Regards,
Muthu Kumar. Received on Thu Nov 10 2005 - 03:28:39 CST

Original text of this message

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