I have done some research on this, and it looks like there are some (very undesirable) options.
- Kill the process in which the database is locked
This is probably not an option for you, and it is not for me either.
- Copy the file and read the copy
This seems like the best solution to this problem. In my case, I am trying to read the sqlite Firefox database. Firefox seems to lock the file for extended periods of time, so I can't just wait.
Since you are copying a database file in real time, you may receive a damaged copy. I do not think there is a risk of corrupting the original (but I'm not sure about that).
Just copy the file in the shell, for example
copy original.sqlite copy.sqlite
or
cp original.sqlite copy.sqlite
Then open as usual.
source share