Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: pl*sql errors...
ksjune wrote
>ORA-06510: PL/SQL: unhandled user-defined exception
>ORA-06512: at "SYS.UTL_FILE", line 82
>ORA-06512: at "SYS.UTL_FILE", line 120
>ORA-06512: at "TESTDBA.MAKE_SQL", line 91
>ORA-06512: at line 1
Most likely, you do not have access rights to the file system. Your Oracle DBA should adjust init.ora to allow any file access. For each directory where you want to read or write, add a line like:
utl_file_dir = /tmp utl_file_dir = /tmp/spool utl_file_dir = /home/ksjune/spool
Note that you can only access the machine where Oracle is running. You cannot write to your own harddisk. System user Oracle needs access to the directories given above, not the current SQL*Plus user.
Furthermore, you should add some exception handling to your code, to find out what went wrong! I bet you'll get Invalid Path, which is raised if the directory is not given in init.ora. Invalid Operation is raised if the path is given in init.ora, but user oracle does not have access rights to the directory or file.
exception
when utl_file.invalid_filehandle then raise_application_error( -20001, 'utl_file: Invalid filehandle', true);
when utl_file.invalid_mode then
raise_application_error( -20002, 'utl_file: Invalid mode', true);
when utl_file.invalid_operation then
Arjan. Received on Fri Mar 12 1999 - 10:23:13 CST
![]() |
![]() |