Home » SQL & PL/SQL » SQL & PL/SQL » file open issue
file open issue [message #222460] Sun, 04 March 2007 22:55 Go to next message
ammishra
Messages: 179
Registered: January 2007
Location: india
Senior Member
Hi,

i am getting error in fallowing code.i am running this code on TOAD.

declare
f utl_file.file_type;
s varchar2(200) := 'this is some info';
begin
f := utl_file.fopen('C:\','test.pl','a',32767);
utl_file.put_line(f,s);
utl_file.fclose(f);

end;



error is as:

ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 18
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at line 5


please let us know what change i need to do.


Thanks,
Yash
Re: file open issue [message #222461 is a reply to message #222460] Sun, 04 March 2007 23:00 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
ORA-29280: invalid directory path

Are you create directory ?
conn sys as sysdba
create or replace directory data as 'c:\data';
grant read , write on directory data to scott;


or
specify UTL_FILE_FIR parameter in init.ora file for directory location.


regards
Taj
Re: file open issue [message #222472 is a reply to message #222461] Mon, 05 March 2007 00:40 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The file C:\test.pl resides on the database server, right?
Re: file open issue [message #222479 is a reply to message #222472] Mon, 05 March 2007 01:29 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
Correct !!!
forget to mention.


regards
Taj
Previous Topic: SQL, PL/SQL Interview Questions
Next Topic: Merging " - " and "+" symbols
Goto Forum:
  


Current Time: Sun Dec 04 18:29:10 CST 2016

Total time taken to generate the page: 0.07695 seconds