On 1/28/15, Mario M. Westphal <m...@mwlabs.de> wrote:
> 1. I don’t have the damaged databases here so I cannot run the diagnosis
> myself. The databases are usually too large to upload or transfer.
> 2. The SQLite version I currently use is (complied using the
> Amalgation and Visual Studio 2012).
> But since not every user always keeps up to day, older versions of SQLite
> are also in use, some maybe 3 to 4 four months old.
> 2. Sorry for being not more specific. With “running analysis” I meant that
> may application runs a
> PRAGMA integrity_check(100)
> after running a wide range of logical checks which checks the data stored in
> the database itself.

Can you adjust your application to "phone home" with the results of
"SELECT sqlite_source_id(); PRAGMA integrity_check;" when you find a

Please also consider activating the Error and Warning Log
(https://www.sqlite.org/errlog.html) and having your application phone
home anomalies detected there too.

> My diagnosis routine then runs ANALYZE for good measure and because the data
> in some of the large tables may change over time a lot.
> If an error has been found by integrity_check(), the diagnosis runs a
> REINDEX operation because this could save the database sometimes in the
> past.
> As the final step of the diagnosis routine, my application runs a VACUUM to
> compress the database (I run the database with auto_vacum=OFF).
> 3.  The "disk image is malformed" error is often encountered during normal
> processing, when one or more SQLite functions return the error e.g. during
> adding large amounts of data. Since my application often works in an
> unattended mode, it records such errors, logs them into a log file and then
> informs the user at the earliest opportunity. I know that an "disk image is
> malformed" may go unnoticed for a long time, especially if the user does not
> run the diagnosis routines frequently.
> 3. I have read  https://www.sqlite.org/howtocorrupt.html of course. This is
> what I refer to as "rule book of how to damage your SQLite database".
> -- Mario
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
sqlite-users mailing list

Reply via email to