UTL_FILE problem [message #142532] |
Sat, 15 October 2005 02:35  |
ponsolomon
Messages: 8 Registered: June 2005 Location: Chennai
|
Junior Member |
|
|
Hi,
I m using Oracle 10.1.0, when i m trying to create a function and execute i encounter a problem..
CREATE OR REPLACE FUNCTION F1 RETURN NUMBER IS
v_output_file1 utl_file.file_type;
BEGIN
v_output_file1 := utl_file.fopen('LOG_DIR', 'NEW.txt', 'a');
utl_file .put_line(v_output_file1, 'NATURE and Beauty');
utl_file.fclose_all;
RETURN 1;
END;
ORA-29289: directory access denied
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "CEM.F1", line 4
ORA-06512: at line 15
Note : i have create a directory called log_dir as sys and grant read permission to public. But the same coding is working in 8i
Kindly help me in this regard
Solomon
|
|
|
|
Re: UTL_FILE problem [message #142676 is a reply to message #142598] |
Mon, 17 October 2005 03:19   |
JSI2001
Messages: 1016 Registered: March 2005 Location: Scotland
|
Senior Member |
|
|
Hi
Quote: | i have create a directory called log_dir as sys and grant read permission to public
|
You are trying to WRITE to the directory. Grant Write priviledge to the appropriate users.
HTH
Jim
|
|
|
Re: UTL_FILE problem [message #142709 is a reply to message #142676] |
Mon, 17 October 2005 06:28   |
ponsolomon
Messages: 8 Registered: June 2005 Location: Chennai
|
Junior Member |
|
|
Thank you Jim,
But still i m getting error like this..
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 460
ORA-29283: invalid file operation
ORA-06512: at "CEM.F1", line 4
How can i proceed further.
Solomon
|
|
|
|