On 15 Sep 2009, at 3:35pm, rschnitzer wrote:

> I have an application that cannot afford to be locked out of the  
> database
> for more than maybe a fraction of a second.  However I'd like my  
> application
> to be able to monitor the database for corruption.
>
> Given that, can anyone provide any general comments on running "pragma
> integrity_check" on a timer, e.g. every five minutes...

If such a thing was really necessary it would be built into the SQLite  
libraries and happen without you having to do it in your application.   
Is your hardware really so untrustworthy that you think your database  
might be corrupted every 5 minutes ?  Are you running SATA over  
BlueTooth or something ?

In a mission-critical application I can understand running an  
integrity check when the application is launched, or if it's perpetual  
once a day.  That's about the most I can imagine being useful, even to  
the most paranoid.

Another aspect is what you want your application to do if the  
integrity check reports an error.  If your application is really that  
important, should it just quit with an error message ?  Don't forget  
the problem of false positives: perhaps integrity_check reports a  
problem when the file is actually okay.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to