I have an application that runs on several machines simultaneously, all on the same local network. The data access code in the application is constructed so that every occurrence of SQLiteConnection.Open()
is paired with an SQLiteConnection.Close()
, and the time-gap between these is minimal.
I was doing maintenance on the installation last weekend. No one was in the office and therefore no one was using the system. It is possible someone left the application open on their machine and simply logged out of Windows or maybe simply put Windows into sleep mode.
I found I could not rename the shared database file. I'm puzzled by this. Why should SQLite keep the file locked at the file-level when - in theory at least - there are no currently open connections?
What I have tried:
I tried restarting the machine I was on, just to be sure I was not the one locking the file somehow, but it was not possible to restart all the other machines on the network.