Tom Shafer wrote: > Senario: TWS is running as the read-only-web-application server. Web clients > search & read-only. Local Clients may be updating the same SQLite db with > ODBC (they are NOT using the web app). (this is tested, and works fine) > > I have a SQLite.exe commandline backup script to copy everything to text > files, and it can be scheduled to run un-attended. > > Question: Am I flirting with some kind of data-concurrency problems ? The > reason for the question is that I tried to backup to a ODBC client; too > clumsy and slow. The TWS/Tcl application could do the backup on the server; > but thats too much coding. Any thoughts ? >
There should not be any danger of data-concurrency problems. SQLite is an ACID database engine.
When clients are writing to the database, they will prevent TWS and your backup script from reading. So hopefully, clients do not keep transactions open for long periods of time. TWS is programmed to retry an SQL request after a few milliseconds if the first attempt blocks (I think) so it should continue to work normally as long as the clients don't block for too long. You can make your backup script do the same by setting the ".timeout" parameter to something greater than 0. For example:
.timeout 10000
-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]