On 4/25/16, Mark Foley <mfoley at novatec-inc.com> wrote:
> I'm new to the list, so apologies if this has been posted before.
>
> I am using sqlite3 3.7.17 on Linux Slackware64 14.1. I use the sqlite3
> command
> every 10 minutes to query several Thunderbird calendar databases.
> Occasionally, I
> have a message, "Error: database is locked"; understandable since
> Thunderbird
> is occasionally updating its database.

If you put the databases in WAL-mode (https://www.sqlite.org/wal.html)
using "PRAGMA journal_mode=WAL;" then this problem will likely go away
(depending on what it is that Thunderbird is doing.)  I suggest trying
that approach first.

>
> First, is there a way to open a database in readonly mode from the command
> line?
> I 've searched the man page and googled, but I find nothing. I've tried
> opening
> the database as dbname?mode=ro, but that doesn't work. The C API has such a
> mode, but apparently not the command line.
>
> If the answer to that question is "no", I would like to request that a
> readonly
> switch be added to future versions of sqlite. I think this would be
> generally
> useful and couldn't be that difficult to implment.
>
> Thanks, Mark
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to