On Thu, Sep 6, 2012 at 9:39 AM, Baruch Burstein <bmburst...@gmail.com>wrote:

> Can sqlite databases be read from a read-only media? I seem to remember
> seeing something about this on the website, but can't find it.
>

Usually.

If the last writer to the database file crashed and left a hot
journal<http://www.sqlite.org/atomiccommit.html#section_4_2>then the
next reader to come along must rollback that journal before it can
start reading, and that will require write access.  We have encountered
cases where companies accidently publish a gazillion copies of a CDROM that
contains a hot journal.  The database on such CDROMs are unreadable.

In WAL mode, readers usually need access to the -shm file.  And they
certainly need to be able to create the -shm file if it doesn't already
exist.  So make sure the databases you put onto read-only media (ex: CDROM)
are in rollback mode.



>
> --
> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to