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!

utl_file.fremove Resulting in an ORA-29283

421852Mar 13 2007 — edited Mar 13 2007
I'm running 10.2.0.3 on a Windows XP box. I've got a very simple procedure whose purpose in life is to copy files that fail processing into an exceptions directory. I've tried using utl_file.frename, but it raises an ORA-29283. I then moved to using a utl_file.fcopy which works, but the utl_file.fremove fails.

The files in question are xml files which I've used to create an xmlType view for processing. I've tried dropping the view before executing the exception file handler, but it has no effect. My guess is that something has the file locked, but since I'm not opening it in my PL/SQL I'm not sure who/what/why it would be locked, particuarly if the view has been dropped. I've double-checked that the user has read/write privileges to the directory I'm passing. My code is very simple:

PROCEDURE MOVEFILE
( v_src_location IN varchar2,
v_filename in varchar2,
v_dest_location IN varchar2,
v_dest_filename IN varchar2,
v_outcome OUT boolean)
is
myCode varchar2(100);
myErr varchar2(100);
BEGIN
UTL_FILE.fcopy (v_src_location, v_filename, v_dest_location, v_dest_filename,1 );
utl_file.fremove(v_src_location, v_filename);

v_outcome := True;
EXCEPTION
WHEN others THEN
myCode := SqlCode;
MyErr := SqlErrM;
insert into api.exception_log
(exception_date, exception_log_number, exception_mni, exception_code,
exception_text)
values
(sysdate, exception_log_number.nextval, 0, myCode, MyErr);
commit;
v_outcome := false ;
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2007
Added on Mar 13 2007
5 comments
673 views