On 6/21/06, Ran <[EMAIL PROTECTED]> wrote:
I have an application that uses sqlite3 API, and open the database file.
While the file is opened (for reading) by sqlite3, I would like to copy the
database file (so to have a copy of the file). I guess I need to place a
shared lock on the file (like sqlite3 does when reading from the file). I
wonder what is the recommended way of doing that.

Ran,
I do this to replicate the database for backup. Aquire an
immediate lock ( "begin immediate" ) then you can copy the
file. Source code in C++ is downloadable from my sqlite
support page (see the replicator).

--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

Reply via email to