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

Home -> Community -> Usenet -> c.d.o.server -> Re: Urgent: UTL_FILE package not working 8.0.6

Re: Urgent: UTL_FILE package not working 8.0.6

From: <yszhang_at_my-deja.com>
Date: Wed, 04 Oct 2000 19:27:03 GMT
Message-ID: <8rg09t$fd4$1@nnrp1.deja.com>

You can try first to determine where is the problem by add some exception code. like...

        EXCEPTION

           WHEN NO_DATA_FOUND THEN
              DBMS_OUTPUT.PUT_LINE('no_data_found');
              UTL_FILE.FCLOSE(file_handle);
           WHEN UTL_FILE.INVALID_PATH THEN
              DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_PATH');
              UTL_FILE.FCLOSE(file_handle);
           WHEN UTL_FILE.READ_ERROR THEN
              DBMS_OUTPUT.PUT_LINE(' UTL_FILE.READ_ERROR');
              UTL_FILE.FCLOSE(file_handle);
           WHEN UTL_FILE.WRITE_ERROR THEN
              DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
              UTL_FILE.FCLOSE(file_handle);
           WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE('other stuff');
              UTL_FILE.FCLOSE(file_handle);
         END;

more exceptions can be found in $ORACLE_HOME/rdbms/admin/utlfile.sql, or read the tech. bulletin on technet.oracle.com

ys

In article <8rfvhg$egf$1_at_nnrp1.deja.com>,   zuot_at_my-deja.com wrote:
> We got error message when try to use Oracle's UTL_FILE package (please
> see below). The path /users/rpauser/dat/stage/utl_files is in the
> init.ora file.
>
> Does anyone know what else could cause the problem?
>
> Your help is highly appreciated.
>
> Jerry Li
> jerryli1_at_hotmail.com
> -----------------------------------------------------------
> SQL> l
> 1 declare
> 2 v_file utl_file.file_type;
> 3 Begin
> 4
> 5 v_file := utl_file.fopen
> ('/users/rpauser/dat/stage/utl_files', 'test_io.txt', 'w');
> 6 utl_file.putf(v_file, 'test IO');
> 7 utl_file.fclose(v_file);
> 8* End;
> SQL> /
> declare
> *
> ERROR at line 1:
> ORA-06510: PL/SQL: unhandled user-defined exception
> ORA-06512: at "SYS.UTL_FILE", line 101
> ORA-06512: at "SYS.UTL_FILE", line 157
> ORA-06512: at line 5
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 04 2000 - 14:27:03 CDT

Original text of this message

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