none
Problem: Lingering File Handles on DFS-R folder

    Question

  • I am trying to find a way to identify what users/end points have a file handle open to a file in a DFS-R folder to further troubleshoot an issue. Here is what's happening to provide some background.  I have a batch script that copies an access database (.mdb) file into a DFS-R folder each evening.  When users log on in the morning, they pull down a copy of the .mdb via a Group Policy Preferences File Operation. (Users only copy the file, no users opens the file from the DFS-R folder.  Over the course of a few days, the batch script starts to not being able to copy over the .mdb file to the folder even when it should be able to, e.g. no users touching the file. After reviewing the issue, I discovered using Process Explorer on the DFS server, there are open file handles to the file in question. The file handles are associated with the SYSTEM process. I'm not sure how I can identify what user is the true/calling owner of the handle so I can troubleshoot this further. Anyone have any tips? thanks in advance!

    Sunday, May 18, 2014 7:06 AM

Answers

  • Hi,

    Try Process Explorer to see if you can see more information.

    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

    And have you tried to use handle.exe to close the open handle? Like this:

    handle -c 9e4 -p 4



    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Thursday, May 22, 2014 8:54 AM

All replies

  • Hi,

    It could also be locked by an application instead of a user such as an antivirus program.

    Please test to run Handle.exe to see if we can find more information about it:

    http://technet.microsoft.com/en-us/Sysinternals/bb896655.aspx

    Specifically please run:

    handle x:\folder\file.mdb

    This will give us a PID. Then you can run

    handle -p <PID>

    to see all files running in that specific PID

    Also in Task Manager you can find the process which related to that PID. 

    Hope this could help getting more clues about it. If you still cannot find out the exact locker, try to kill that process and see if it will come back. 


    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Monday, May 19, 2014 7:36 AM
  • Thanks for your reply. I did use handle and it returns a PID of 4 which is the SYSTEM process. When I grab all the handles of the SYSTEM process, it just shows me the handles that I can see by using process explorer for the file in question. I don't see a way to identify the source of the handle lock.  Are there any other utilities I can use to help figure out what the source of the file handle is? Below is the output from handle -p 4 if that helps.

      9E4: File  (---)   F:\Global\ApplicationData\file.mdb
     2804: File  (R-D)   F:\Global\ApplicationData\file.mdb
     4588: File  (---)   F:\Global\ApplicationData\file.mdb
     6804: File  (R-D)   F:\Global\ApplicationData\file.mdb
     781C: File  (R-D)   F:\Global\ApplicationData\file.mdb
     7AD4: File  (---)   F:\Global\ApplicationData\file.mdb

    Tuesday, May 20, 2014 8:59 PM
  • Hi,

    Try Process Explorer to see if you can see more information.

    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

    And have you tried to use handle.exe to close the open handle? Like this:

    handle -c 9e4 -p 4



    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Thursday, May 22, 2014 8:54 AM