Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-20100: Invalid Path

455834Jun 12 2006 — edited Jun 12 2006

Hi all,

I am having problem in the following code:

declare
  v_file_id            utl_file.file_type;
  v_file_dir           VARCHAR2(100); 
  v_file_name          VARCHAR2(100);
  v_ctl_code           VARCHAR2(100);
begin

  v_ctl_code := 'This is just a test ...';
  v_file_id := utl_file.fopen(v_file_name, 'w', 32767);
  utl_file.put_line(v_file_id, v_ctl_code);

exception
      
       WHEN UTL_FILE.INVALID_PATH THEN
         RAISE_APPLICATION_ERROR(-20100,'Invalid Path');
       WHEN UTL_FILE.INVALID_MODE THEN
         RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');
       WHEN UTL_FILE.INVALID_OPERATION then
         RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');
       WHEN UTL_FILE.INVALID_FILEHANDLE then
         RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');
       WHEN UTL_FILE.WRITE_ERROR then
         NULL;
       WHEN UTL_FILE.READ_ERROR then
         RAISE_APPLICATION_ERROR(-20105,'Read Error');
       WHEN UTL_FILE.INTERNAL_ERROR then
         RAISE_APPLICATION_ERROR(-20106,'Internal Error');
       WHEN OTHERS THEN
       utl_file.fclose(v_file_id);
       raise_application_error (-20001, sqlerrm);

end;
/

parameter is already set to :

utl_file_dir    '/test/out'

But the code gives me the following error:

ORA-20100: Invalid Path
ORA-06512: at line 14

Any idea will be highly appreciated.

Thanks and Regards

Aqil

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2006
Added on Jun 12 2006
1 comment
845 views