Thursday, March 19, 2009

Closing a process handle - Unable to delete files due to Application or process handle

Problem & Symptom : Are you facing a problem like unable to delete a folder due to a process handle Eg: NBU_VSP_CACHE ( This is created by Veritas Netbackup becoz VSP was configured as snapshot provider )
Cause : Such files are in use by a process which is active - which prevents deleting same.

Solution :
Use Process Explorer tool ( from sysinternals - Microsoft )
Process Explorer shows you information about which handles and DLLs processes have opened or loaded.
The Process Explorer display consists of two sub-windows. The top window always shows a list of the currently active processes, including the names of their owning accounts, whereas the information displayed in the bottom window depends on the mode that Process Explorer is in: if it is in handle mode you'll see the handles that the process selected in the top window has opened; if Process Explorer is in DLL mode you'll see the DLLs and memory-mapped files that the process has loaded. Process Explorer also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded.

You can navigate & find the specific file which is handling by some process. right click on same and close the handle.then you will be able to delete the file.

1 comment: