There are times when you want to know what users are currently logged in on your network and what files they have in use. The most common issue is when a user leaves open files on the server. Use the commands below FROM THE SERVER, to identify a user and disconnect them from causing the lock.

1. Open a command window.

2. cd\

3. a. openfiles /query /v >filelist.txt (This shows Network Share Connections)

3. b. openfiles /query /local /v >filelist.txt (This shows Local programs on the Server) **Big List

4. notepad c:\filelist.txt

 

What this will show you:

Hostname is the Computer that has the file open.

Id is the process ID of the file handle

Accessed by is their Login Name

Type is process type

#locks is the number of locks they have on the file.

Open Mode is if they can write to the file.

Path is the local path.

 

INFO: The system global flag 'maintain objects list' needs

      to be enabled to see local opened files.

      See Openfiles /? for more information.

 

 

Files opened remotely via local share points:

---------------------------------------------

 

Hostname        ID       Accessed By          Type       #Locks     Open Mode       Open File (Path\executable)                                                     

=============== ======== ==================== ========== ========== =============== ================================================================================

VCS-S2003-1     88       ADMINISTRATOR        Windows    0          Read            D:\GovCollect\PlusR_EN.dll

VCS-S2003-1     89       ADMINISTRATOR        Windows    0          Read            D:\GovCollect\GovCollect.exe

VCS-S2003-1     102      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ParameterMaster.DBF

VCS-S2003-1     103      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ParameterMaster.MDX

VCS-S2003-1     105      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\Citywide.DBF

VCS-S2003-1     106      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\Citywide.MDX

VCS-S2003-1     114      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SECURITY.DBF

VCS-S2003-1     115      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SECURITY.DBT

VCS-S2003-1     116      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SECURITY.MDX

VCS-S2003-1     117      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\GLTRAN.DBF

VCS-S2003-1     118      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\GLTRAN.MDX

VCS-S2003-1     119      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\TRANCTL.DBF

VCS-S2003-1     120      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\TRANCTL.DBT

VCS-S2003-1     121      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\TRANCTL.MDX

VCS-S2003-1     122      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PROPERTY.DBF

VCS-S2003-1     123      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PROPERTY.DBT

VCS-S2003-1     124      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PROPERTY.MDX

VCS-S2003-1     125      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\TRAN.DBF

VCS-S2003-1     126      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\TRAN.MDX

VCS-S2003-1     127      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PAYMENTS.DBF

VCS-S2003-1     128      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PAYMENTS.DBT

VCS-S2003-1     129      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\PAYMENTS.MDX

VCS-S2003-1     130      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\MTG.DBF

VCS-S2003-1     131      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\MTG.DBT

VCS-S2003-1     132      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\MTG.MDX

VCS-S2003-1     133      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SERVICE.DBF

VCS-S2003-1     134      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SERVICE.DBT

VCS-S2003-1     135      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\SERVICE.MDX

VCS-S2003-1     136      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ACH.DBF

VCS-S2003-1     137      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ACH.DBT

VCS-S2003-1     138      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ACH.MDX

VCS-S2003-1     139      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\CREDITCD.DBF

VCS-S2003-1     140      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\CREDITCD.DBT

VCS-S2003-1     141      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\CREDITCD.MDX

VCS-S2003-1     142      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\WORKORD.DBF

VCS-S2003-1     143      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\WORKORD.DBT

VCS-S2003-1     144      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\WORKORD.MDX

VCS-S2003-1     145      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ORDERS.DBF

VCS-S2003-1     146      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ORDERS.DBT

VCS-S2003-1     147      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ORDERS.MDX

VCS-S2003-1     148      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\APPRAISE.DBF

VCS-S2003-1     149      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\APPRAISE.DBT

VCS-S2003-1     150      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\APPRAISE.MDX

VCS-S2003-1     151      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\EVENTS.DBF

VCS-S2003-1     152      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\EVENTS.DBT

VCS-S2003-1     153      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\EVENTS.MDX

VCS-S2003-1     154      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\GLLIST.DBF

VCS-S2003-1     155      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ASSESS.DBF

VCS-S2003-1     156      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ASSESS.DBT

VCS-S2003-1     157      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\ASSESS.MDX

VCS-S2003-1     159      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\PLUSRUN.EXE

VCS-S2003-1     168      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\capwork\tvance\session.DBF

VCS-S2003-1     169      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\capwork\tvance\session.MDX

VCS-S2003-1     170      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\Hand3.cur

VCS-S2003-1     171      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\SECURITY_LOG.pro

VCS-S2003-1     173      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\Security_log.MDX

VCS-S2003-1     174      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\landingpad.wfo

VCS-S2003-1     179      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\receiptlogo.bmp

VCS-S2003-1     180      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\govcollect.jpg

VCS-S2003-1     181      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\BUILDPOPUP.pro

VCS-S2003-1     187      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\USER_SECURITY_PROFILE.pro

VCS-S2003-1     188      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\progress_bar.wfo

VCS-S2003-1     189      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\User_Security_Profile.DBF

VCS-S2003-1     190      ADMINISTRATOR        Windows    0          Write + Read    D:\govcollect\User_Security_Profile.MDX

VCS-S2003-1     193      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\RESOURCE.DLL

VCS-S2003-1     204      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\BUILDPIDNGRID.pro

VCS-S2003-1     205      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\govcollect.wfo

VCS-S2003-1     208      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\GovCollect.mno

VCS-S2003-1     213      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\LOADPARAMETERARRAY.pro

VCS-S2003-1     243      ADMINISTRATOR        Windows    0          Read            D:\GovCollect\SYNCCITYWIDE.pro

 

If you want to kill a connection:

 

openfiles /disconnect /id [Put id Number Here] [ENTER]

 

openfiles /disconnect /a [Put User Login Name Here] [ENTER]

 

openfiles /disconnect /s [Put Computer Name Here] [ENTER]

 

For more information please read:

 

http://technet.microsoft.com/en-us/library/bb490961.aspx