Error starting at line 1 in command:
BEGIN
DECLARE
file_name VARCHAR2(50);
file_handle utl_file.file_type;
BEGIN
file_name := 'table.txt';
file_handle := utl_file.fopen('SEND',file_name,'W');
FOR rec in(
SELECT column 1
||'~'||column 2
||'~'||column 3 out_line
FROM table1)LOOP
UTL_FILE.PUT_LINE(file_handle,rec.out_line);
UTL_FILE.FFLUSH(file_handle);
END LOOP;
UTL_FILE.FCLOSE(file_handle);
END;
end;
Error report:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 7
29283. 00000 - "invalid file operation"
Cause: An attempt was made to read from a file or directory that does
not exist, or file or directory access was denied by the
operating system.
Action: Verify file and directory access privileges on the file system,
and if reading, verify that the file exists.
We had migrated our servers from standalone to RAC and sometimes they worked sometimes not.
It was because we were not using the shared location for utl directory.
Once we put the files on shared location,it started working.
No comments:
Post a Comment