Angus March <an...@uducat.com> wrote: > I want to copy a db file while it is still open, and I'm wondering how > safe that is. It would go something like this: > > 1. Lock exclusively with PRAGMA locking_mode=EXCLUSIVE; Many process > are accessing the db afterall > 2. UPDATE a_table SET a_column=0; > 3. After finalizing (I'm using the C API) the queries in 1 and 2, > but before closing the connection to the db, I would copy the db > file.
Why not just run BEGIN EXCLUSIVE before copying, and ROLLBACK (or COMMIT, doesn't matter since you made no changes) afterward? Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users