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: utl_file_dir setting not working

Re: utl_file_dir setting not working

From: Sean M. Dillon <sdillon_at_us.oracle.com>
Date: Tue, 18 Jan 2000 07:57:06 -0500
Message-ID: <smKEOBxkPVhLQG1smhcEa2ONkHvf@4ax.com>


On Mon, 17 Jan 2000 16:23:16 -0800, real <real_at_yahoo.com> wrote:

>For some odd reason, the setting up of utl_file_dir is not working on
>our Oracle 8.0.5 Database -- Solaris 2.7.
>
>Here's what I have done:
>
>Setting in init<SID>.ora specifying directory
>Bounced instance.
>Recompiled sys schema (as a last ditch effort).
>
>I've checked the all_directories view, there is nothing there.
>I've checked in the sys.dir$ table (base table view queries) and nothing
>is there -- expected.
>
>We have this working on other servers, so I don't get what the problem
>is.

declare these in your PL/SQL block:

g_invalid_path_msg constant varchar2(255) default 'INVALID_PATH: File location or filename was invalid.'; g_invalid_mode_msg constant varchar2(255) default 'INVALID_MODE: The open_mode parameter in FOPEN was invalid.'; g_invalid_filehandle_msg constant varchar2(255) default 'INVALID_FILEHANDLE: The file handle was invalid.'; g_invalid_operation_msg constant varchar2(255) default 'INVALID_OPERATION: The file could not be opened or operated on as requested.';
g_read_error_msg constant varchar2(255) default 'READ_ERROR: An operating system error occurred during the read operation.'; g_write_error_msg constant varchar2(255) default 'WRITE_ERROR: An operating system error occurred during the write operation.';
g_internal_error_msg constant varchar2(255) default 'INTERNAL_ERROR: An unspecified error in PL/SQL.';

and use this exception block:

exception

    when utl_file.invalid_path then
        raise_application_error(-20001,g_invalid_path_msg);
    when utl_file.invalid_mode then
        raise_application_error(-20002,g_invalid_mode_msg);
    when utl_file.invalid_filehandle then
        raise_application_error(-20002,g_invalid_filehandle_msg);
    when utl_file.invalid_operation then
        raise_application_error(-20003,g_invalid_operation_msg);
    when utl_file.read_error then
        raise_application_error(-20004,g_read_error_msg);
    when utl_file.write_error then
        raise_application_error(-20005,g_write_error_msg);
    when utl_file.internal_error then
        raise_application_error(-20006,g_internal_error_msg);

This might help you identify the problem...

--
Sean Dillon
Oracle Corporation
sdillon_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Jan 18 2000 - 06:57:06 CST

Original text of this message

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