Author Topic: ORA-29280: invalid directory path  (Read 20283 times)

Mike

  • Administrator
  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
ORA-29280: invalid directory path
« on: September 12, 2009, 08:04:55 AM »
SQL> exec mail_attach('script.sql')
BEGIN mail_attach('script.sql'); END;
*
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "VEMS.MAIL_ATTACH", line 27
ORA-06512: at line 1
SQL>

Possible solutions:

- Be sure that the OS level user has permission to write to a folder
 
- Try upper case letters for the directory name, i.e. instead of out_dir use OUT_DIR

- The UTL_FILE_DIR parameter has been deprecated. Create a DIRECTORY object and use that.


tanveer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: ORA-29280: invalid directory path
« Reply #1 on: September 12, 2009, 10:53:35 PM »

create directory ORALOAD AS 'C:\EMAILSETUP';
 
After creating an Oracle directory and running the same procedure below error is comming up.
 
SQL> exec MAIL_ATTACH('NTD.TXT')
BEGIN MAIL_ATTACH('NTD.TXT'); END;

*
ERROR at line 1:
ORA-29282: invalid file ID
ORA-06512: at "SYS.UTL_FILE", line 1095
ORA-06512: at "VEMS.MAIL_ATTACH", line 25
ORA-06512: at line 1

SQL>

 
Here is the actual code and variable declaration.
 
l_output  Utl_File.File_Type;
rfile   RAW(32767);
flen    NUMBER;

 
utl_file.fgetattr('ORALOAD', fname, ex, flen, bsize);
vInHandle := utl_file.fopen('ORALOAD', fname, 'R');
utl_file.get_raw(l_output, rfile, flen); --- line 25
utl_file.fclose(vInHandle);
 
 
Please advise how to fix this issue.
Thanks in anticipation.
 
Tanveer
 

ssharma

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: ORA-29280: invalid directory path
« Reply #2 on: September 23, 2009, 09:39:32 AM »
See if you have done this after creating directory object?

grant read, write on directory ORALOAD to <user>;

rony59

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: ORA-29280: invalid directory path
« Reply #3 on: October 19, 2009, 12:15:45 AM »
i don't know do u add the file directory in the init.ora file after intialize the directory u should need create directory and also need to grant priv  the directory

rony59

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: ORA-29280: invalid directory path
« Reply #4 on: October 19, 2009, 12:18:57 AM »
i don't know do u add the file directory in the init.ora file after intialize the directory u should need create directory and also need to grant priv  the directory


rony59

  • Newbie
  • *
  • Posts: 3
    • View Profile
Connect with remote database by sql
« Reply #5 on: October 19, 2009, 12:25:38 AM »
hello all
i have face a piculiar problem that is i cold not connect with the remote database by sql..
but network and tns ping ok, i have able connect from the remote database to my own database, i alrady add all info in tnsname.ora file
 
any one can help me plz
newbielink:mailto:kashem01459@gmail.com [nonactive]