Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06512: at "SYS.UTL_FILE"

663981Nov 3 2008 — edited Nov 4 2008
Hi
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2008
Added on Nov 3 2008
19 comments
16,994 views