I think a '/' is missing after vijay.
The documnentation states
"The file location and file name parameters are supplied to the FOPEN
function as separate strings, so that the file location can be checked
against the list of accessible directories as specified in the
initialization file. Together, the file location and name must represent a
legal filename on the system, and the directory must be accessible"

Mote however that if you define utl_file_dir=* this can override o/s level
file permissions and can allow users to amend or delete files that they
should not be allowed to normally. See the following notes 

The parameter specification UTL_FILE_DIR = * has a special meaning. This
entry turns off directory access checking, and it makes any directory
accessible to the UTL_FILE functions. 


----------------------------------------------------------------------------
----
Caution: 

The '*' option should be used with great caution. Oracle does not recommend
that you use this option in production systems. Also, do not include '.'
(the current directory for UNIX) in the accessible directories list. 

To ensure security on file systems that enable symbolic links, users must
not be allowed WRITE permission to directories accessible by PL/SQL file I/O
functions. The symbolic links and PL/SQL file I/O could be used to
circumvent normal operating system permission checking and allow users
read/write access to directories to which they would not otherwise have
access.  
 
HTH

John

-----Original Message-----
Sent: 21 June 2002 12:58
To: Multiple recipients of list ORACLE-L


my prog looks like this (utl_file_dir=* is present in initSID.ora file):

DECLARE
        fileHandler UTL_FILE.FILE_TYPE;
BEGIN
        dbms_output.put_line('1');
        fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W');
        dbms_output.put_line('2');
        UTL_FILE.PUTF(fileHandler, 'hai vijay \n');
        UTL_FILE.FCLOSE(fileHandler);
EXCEPTION
        WHEN utl_file.invalid_path THEN
        raise_application_error(-20000, 'ERROR: Invalid path for file.');
END;

and when i am running this script i am getting a message like this:

1
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

what can be the problem...

regards,
vijay
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Vijaya Chander V.S
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to