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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UTL_File -- invalid path error

Re: UTL_File -- invalid path error

From: Krishna Kakatur <Krishna.Kakatur_at_Sun.COM>
Date: Sun, 15 Feb 2004 09:24:40 -0800
Message-id: <402FAB58.1000802@Sun.COM>

Check if the instance is started with those init files, with the command,
SQL> show parameters utl_file_dir
and restart the instance if you don't find the utl file directories here.

If it doesn't solve the problem, check if you can change the init entry to one of the below:

utl_file_dir=c:\
utl_file_dir=c:

and restart the instance.

-- 
Thanks,
Krishna



Maryann Atkinson wrote:

> Would anyone happen to know why the code below the dashed line
> gives as error the following 3 lines?
>
> > Right before opening the file
> > Invalid Path Error 1 User-Defined Exception
> > PL/SQL procedure successfully completed.
>
> Both my
> C:\oracle\admin\Oracle9i\pfile\init.ora as well as my
> C:\oracle\admin\Ora9i\pfile\init.ora
>
> files, have the line:
>
> utl_file_dir=c:\\
> somewhere towards the bottom...
>
> thx
> maa
>
> -------------------------------------------------------------------------------------------------------------------------
> DECLARE
> InFile UTL_FILE.File_Type;
> InputLine VARCHAR2(1022);
>
> BEGIN
> dbms_output.put_Line('Before Opening the file');
>
> InFile := UTL_FILE.FOPEN('C:\', 'FILEIO.TXT', 'R');
>
> DBMS_Output.Put_Line('After the FileOpen');
>
>
> LOOP
> BEGIN
> UTL_FILE.GET_LINE(InFile, InputLine);
>
> DBMS_Output.Put_Line(InputLine);
>
> EXCEPTION
> WHEN NO_DATA_FOUND THEN EXIT;
> END;
> END LOOP;
>
> UTL_FILE.FCLOSE(InFile);
>
> DBMS_Output.Put_Line('Execution Ends.');
>
> EXCEPTION
> WHEN UTL_File.Invalid_Path THEN
> DBMS_Output.Put_Line('Invalid Path Error '
> || TO_CHAR(SQLCODE)
> || ' ' || SQLErrM);
> WHEN UTL_File.Invalid_Mode THEN
> DBMS_Output.Put_Line('Invalid Mode Error '
> || TO_CHAR(SQLCODE)
> || ' ' || SQLErrM);
> /**/
> WHEN UTL_File.Invalid_Operation THEN
> DBMS_Output.Put_Line('Invalid Operation Error '
> || TO_CHAR(SQLCODE)
> || ' ' || SQLErrM);
> WHEN UTL_File.Internal_Error THEN
> DBMS_Output.Put_Line('Internal Error '
> || TO_CHAR(SQLCODE)
> || ' ' || SQLErrM);
> WHEN OTHERS THEN
> DBMS_Output.Put_Line('Error ' || To_Char(SQLCODE)
> || ' ' || SQLErrM);
> END;
> /
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------
Received on Sun Feb 15 2004 - 11:24:40 CST

Original text of this message

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