ORA-06512: at "SYS.UTL_FILE"
663981Nov 3 2008 — edited Nov 4 2008Hi
i wrote a procedure to read form a text file and update the table though i have all the privilages to read and write still i get this error
code:
----------------
declare
PATH varchar2(50) := '/DEV';
filename varchar2(50) := 'Test.txt';
v_input_file utl_file.file_type;
v_input_buffer varchar2(500);
v_id Varchar2(20);
v_num number(1);
begin
v_input_file := utl_file.fopen (PATH, filename, 'R');
loop
utl_file.get_line (v_input_file, v_input_buffer);
v_id := LTRIM(RTRIM(substr( v_input_buffer, 1, 12 )));
v_num := LTRIM(RTRIM(substr( v_input_buffer, 14,1 )));
UPDATE fdb_ndc SET indicator= v_num where NDC=v_id;
commit;
end loop;
exception
when no_data_found then
utl_file.fclose(v_input_file);
end ;
Error
---------
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 line 10
I know that this is a privilage error but still i am not able to figure it out. Previously i was able to write and read from text without this error
i tried to update on the table seperatly by sql statement and i was sucessful
Can anyone say me where i was wrong and how i can come over this error
Thanks!
-NBSR