You need to know the open files on the system
You can use the openfiles (openfiles.exe) tool under windows to deliver this information. Before using it you need to
activate the gathering of the information. Because of performance issues it is deactivated by default.
openfiles /Local ON
The system needs a reboot after this command! The program can be used to look at local or remote open files. Searching in
the output can be done with find.
openfiles |find /i "word"
openfiles |find /i "h:"
When you have a stick on h: you can see which files are still open. You can close open files with
openfiles /disconnect /id <id>
where id is the id you find in the output of the program. When you have a user and want to close his files you can use:
openfiles /disconnect /a <user>
To deactivate the gathering of open file information you use:
openfiles /local off
About the Author
Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.