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

Home -> Community -> Usenet -> c.d.o.tools -> UTL_FILE problem

UTL_FILE problem

From: Frank Han <fank.han_at_mt.com>
Date: 2000/05/19
Message-ID: <YDgV4.843$mh3.12550@news>#1/1

I wrote utl_file.sql to test UTL_FILE package. Our DBA has set UTL_FILE_DIR=oracle8i/tmp and I have mapped oracle/tmp to drive e: I have full control rights for drive e: and e:\han. The program and error message are as followings.



declare
     output_file   varchar2(30);
     output_dir    varchar2(40);
     output_type   UTL_FILE.FILE_TYPE;

begin

     if UTL_FILE.IS_OPEN(output_type) then
          UTL_FILE.FCLOSE(output_type);
     end if;

     output_dir := 'e:\han';
     output_file := 'debug.out';

     output_type := UTL_FILE.FOPEN(output_dir,output_file,'W');
     UTL_FILE.PUTF(output_type,'This is a test!');
     UTL_FILE.FCLOSE(output_type);
exception
     WHEN UTL_FILE.INVALID_OPERATION THEN
       raise_application_error(-20102,'Debug: Invalid File operation');
end;
/

spool off;

/* The errors:

declare
*
ERROR at line 1:

ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at line 11

*/

Who know how to solve the problem?

Thanks
Frank Han
frank.han_at_mt.com Received on Fri May 19 2000 - 00:00:00 CDT

Original text of this message

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