Check if SQLite Databases Are Locked

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Check if SQLite Databases Are Locked

Cecil Westerhof-5
I am using a lot of SQLite databases. The problem is that I sometimes do
things in a DB browser, but do not write or revert changes. This can give
problems with my cron scripts that use the locked database.

Because of this I wrote a script that accept a series of databases as
argument and check all those databases for being locked and print a line
for the databases that are locked. So when no databases are locked, there
is no output.

I have a cron entry that runs this script twice an hour, so I will be
notified if I have to unlock a database.

If you are interested you can find the script here:

Cecil Westerhof
sqlite-users mailing list
[hidden email]