I have set the timeout now and will monitor this change, on the note of using WAL I do have a question. The database is accessed by SQLite 3.6.4 from a vendor's application, but on command-line I used 3.7.9; am I asking from trouble? Should I go through the effort to force the vendor's application to use the 3.7.9 version when talking to my custom DB?
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Duquette, William H (318K) Sent: Tuesday, May 08, 2012 5:13 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite via TCL Question On 5/8/12 1:51 PM, "Tilsley, Jerry M." <jmtils...@st-claire.org> wrote: >This is probably a newbie question so please bear with me. I'm >accessing a SQLite database through TCL and periodically I get a "Database >Locked" >error. This is a multi-thread process that writes to the DB, do I need >to enable WAL for this, if so, do I do this from the TCL side or the >command-line side? If only one thread is writing, then using WAL should do the trick; the other threads can read while the writer is writing. If multiple threads are writing, that's a whole different issue, and WAL (while it might still be a good idea) won't prevent the problem. You enable WAL mode using the "journal_mode" pragma; once it's set it's persistent. So you'd want to set it when creating a new database, wherever you do that; on an existing database, wherever you like. See sqlite.org/wal/html. If you've gotten multiple writers you can set a lock timeout using the database handle's "timeout" subcommand; it defaults to 0.0. You'll still need to handle lock errors, though; a timeout isn't a guarantee. Will -- Will Duquette -- william.h.duque...@jpl.nasa.gov Athena Development Lead -- Jet Propulsion Laboratory "It's amazing what you can do with the right tools." > >________________________________ > >Disclaimer**** >This email is confidential and intended solely for the use of the >individual to whom it is addressed. Any views or opinions presented are >solely those of the author and do not necessarily represent those of St. >Claire Regional Medical Center. If you are not the intended recipient, >be advised that you have received this email in error and that any use, >dissemination, forwarding, printing or copying of the email is strictly >prohibited. If you received this email in error please notify the St. >Claire Regional Helpdesk by telephone at 606-783-6565. >_______________________________________________ >sqlite-users mailing list >sqlite-users@sqlite.org >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ________________________________ Disclaimer**** This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of St. Claire Regional Medical Center. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of the email is strictly prohibited. If you received this email in error please notify the St. Claire Regional Helpdesk by telephone at 606-783-6565. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users