Page 1 of 1

Is there a way to ensure that a Zeoslib sqlite database is opened read only?

Posted: 01.04.2016, 00:08
by vfclists
What settings can I use to ensure that a Sqlite database opened in Zeoslib will not interfere with the ability of another process to read from it?

I think that is something that should be set in the TZConnection properties. Is there some option or something in the parameters that will ensure that another process needing to write to the same database will not be blocked?

Re: Is there a way to ensure that a Zeoslib sqlite database is opened read only?

Posted: 01.04.2016, 14:28
by marsupilami
Hello vfclists,

as far as I know SQLite always attaches in a way where other processes are able to read the same database. The database file only gets locked, when data is written to the database. So basically there is nothing to do in Zeos.
If however you happen to have a database with a lot of writes, it seems that reading processes can time out. In that case you might want to check out the SQLite write ahead log [1].

If you describe more of your problem, maybe we can help you in a better way.

With best regards,

Jan

1: https://www.sqlite.org/pragma.html#pragma_journal_mode