My Oracle Support Banner

Unable to Delete File After UTL_FILE Left File Open on Windows (Doc ID 1453572.1)

Last updated on OCTOBER 05, 2022

Applies to:

PL/SQL - Version and later
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)


On Windows a file opened using UTL_FILE is unable to be deleted as the file was left opened and not closed using UTL_FILE.FCLOSE.

Even when the session is closed (or sqlplus exited) the file remains locked.

Example code that leaves an open file

* note we do not close the file - the FCLOSE is commented out




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.