Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I wrote a flakey PL/SQL script that crashed out and forgot to close the file handle (type UTL_FILE.file_type).

Now I can't delete the file. Short of restarting the instance or rebooting the box, is there anything I can run within Oracle to clear the handle? I've system user access to the box in question.

Update: Oracle is running on Windows.

share|improve this question
    
Which OS are you on? I'm guessing Windows, as filesystems on Unix-like OSes generally let you delete a file even if opened by another process. –  Colin 't Hart Jan 23 at 13:05
    
if you know which session has oened the file you could kill this session. At least on Linux this would work. –  miracle173 Mar 26 at 3:36
    
@Colin 't Hart : in Unix you can delete a directory entry while it is open but cannot delete the file until the last file handle is closed. So you have a similar problem. –  miracle173 Mar 26 at 3:41

1 Answer 1

If you just want to forcefully close the file, you could use a tool which lets you close open files.

Googling I found OpenFilesView. See http://www.nirsoft.net/utils/opened_files_view.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.