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:57:38 GMT
Message-ID: <8rg23d$h0l$1@nnrp1.deja.com>

well...if i were you, i'm going to check the mode of the dir. and file, disk space...
I may give you a bad example, have you notice that there're 5 same message "UTL_FILE.WRITE_ERROR"s for different reasons? you can change them to different messages, like...
> 18 WHEN UTL_FILE.WRITE_ERROR THEN
> 19 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 20 UTL_FILE.FCLOSE(v_file);
> 21 WHEN UTL_FILE.INVALID_MODE THEN
> 22 DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_MODE');
> 23 UTL_FILE.FCLOSE(v_file);
> 24 WHEN UTL_FILE.INVALID_OPERATION THEN
> 25 DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_OPERATION');
> 26 UTL_FILE.FCLOSE(v_file);
> 27 WHEN UTL_FILE.INTERNAL_ERROR THEN
> 28 DBMS_OUTPUT.PUT_LINE('UTL_FILE.INTERNAL_ERROR');
> 29 UTL_FILE.FCLOSE(v_file);
> 30 WHEN UTL_FILE.INVALID_FILEHANDLE THEN
> 31 DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_FILEHANDLE');
> 32 UTL_FILE.FCLOSE(v_file);

good luck
ys

In article <8rg1b1$g48$1_at_nnrp1.deja.com>,   zuot_at_my-deja.com wrote:
> Thanks for your help.
>
> The error is: UTL_FILE.WRITE_ERROR.
>
> Any additional comments? Thanks,
>
> Jerry Li
> ----------------------------
> 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 EXCEPTION
> 9 WHEN NO_DATA_FOUND THEN
> 10 DBMS_OUTPUT.PUT_LINE('no_data_found');
> 11 UTL_FILE.FCLOSE(v_file);
> 12 WHEN UTL_FILE.INVALID_PATH THEN
> 13 DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_PATH');
> 14 UTL_FILE.FCLOSE(v_file);
> 15 WHEN UTL_FILE.READ_ERROR THEN
> 16 DBMS_OUTPUT.PUT_LINE(' UTL_FILE.READ_ERROR');
> 17 UTL_FILE.FCLOSE(v_file);
> 18 WHEN UTL_FILE.WRITE_ERROR THEN
> 19 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 20 UTL_FILE.FCLOSE(v_file);
> 21 WHEN UTL_FILE.INVALID_MODE THEN
> 22 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 23 UTL_FILE.FCLOSE(v_file);
> 24 WHEN UTL_FILE.INVALID_OPERATION THEN
> 25 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 26 UTL_FILE.FCLOSE(v_file);
> 27 WHEN UTL_FILE.INTERNAL_ERROR THEN
> 28 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 29 UTL_FILE.FCLOSE(v_file);
> 30 WHEN UTL_FILE.INVALID_FILEHANDLE THEN
> 31 DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
> 32 UTL_FILE.FCLOSE(v_file);
> 33 WHEN OTHERS THEN
> 34 DBMS_OUTPUT.PUT_LINE('other stuff');
> 35 UTL_FILE.FCLOSE(v_file);
> 36* End;
> SQL> /
> UTL_FILE.WRITE_ERROR
>
> PL/SQL procedure successfully completed.
>
> In article <8rg09t$fd4$1_at_nnrp1.deja.com>,
> yszhang_at_my-deja.com wrote:
> > 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.
> >
>
> 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:57:38 CDT

Original text of this message

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