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 -> Re: UTL_FILE problem

Re: UTL_FILE problem

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/05/19
Message-ID: <958764565.3150.0.pluto.d4ee154e@news.demon.nl>#1/1

The procedure runs from the server, so it won't recognize your drive mappings.

Hth,

Sybrand Bakker, Oracle DBA

Frank Han <fank.han_at_mt.com> schreef in berichtnieuws YDgV4.843$mh3.12550_at_news...
> 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