Re: [sqlite] SQLite3 : Corrupt/IO Error
By default sqlite3 is fairly safe, so when you change a pragma ensure that you are not disabling a safety feature. To get an idea, check this thread where I had the opposite need (more speed, less safety) http://sqlite.1065341.n5.nabble.com/What-pragma-to-use-to-get-maximum-speed-at-expense-of-safety-td68488.html About backups, here is the documentation: http://www.sqlite.org/backup.html I personally always used the historical way. And copied the backups in a remote server. On Fri, Jul 19, 2013 at 12:00 PM, techi ethwrote: > Thanks for answer. > > I can do integrity check by PRAGMA integrity_check.Please correct me if i > wrong. > Here backup means copying database file OR we can create query to SQLite > for backup or copy. > > Cheers- > Techi > > > > On Wed, Jul 17, 2013 at 4:42 PM, Paolo Bolzoni < > paolo.bolzoni.br...@gmail.com> wrote: > >> On Wed, Jul 17, 2013 at 12:55 PM, techi eth wrote: >> > 2) How do we make database safe from these error Or What is >> Possibility to >> > access database after error. >> After error, as Stephan said you are out of luck. >> >> You should avoid this errors in the first place: >> - make backup often, >> - keep the safety features of sqlite3 on, >> - use a error resilient filesystem (e.g., zfs), >> - use ecc memory. >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 : Corrupt/IO Error
Thanks for answer. I can do integrity check by PRAGMA integrity_check.Please correct me if i wrong. Here backup means copying database file OR we can create query to SQLite for backup or copy. Cheers- Techi On Wed, Jul 17, 2013 at 4:42 PM, Paolo Bolzoni < paolo.bolzoni.br...@gmail.com> wrote: > On Wed, Jul 17, 2013 at 12:55 PM, techi ethwrote: > > 2) How do we make database safe from these error Or What is > Possibility to > > access database after error. > After error, as Stephan said you are out of luck. > > You should avoid this errors in the first place: > - make backup often, > - keep the safety features of sqlite3 on, > - use a error resilient filesystem (e.g., zfs), > - use ecc memory. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 : Corrupt/IO Error
On Wed, Jul 17, 2013 at 12:55 PM, techi ethwrote: > 2) How do we make database safe from these error Or What is Possibility > to > access database after error. After error, as Stephan said you are out of luck. You should avoid this errors in the first place: - make backup often, - keep the safety features of sqlite3 on, - use a error resilient filesystem (e.g., zfs), - use ecc memory. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 : Corrupt/IO Error
On Wed, Jul 17, 2013 at 12:55 PM, techi ethwrote: > Hi, > > I have question on SQLITE_CORRUPT, SQLITE_IOERR occur during database > access. > > Question > > 1) How to get generated this kind of error for testing. > While your application has the db opened, use a tool of your choice to overwrite part of the db file. e.g. load it in a text editor and re-save it. That "should" cause your app to fail fairly quickly. 2) How do we make database safe from these error Or What is > Possibility to > access database after error. > By definition, a corrupt db cannot be safely/reliably accessed. Once it is corrupt, any access has undefined behaviour. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite3 : Corrupt/IO Error
Hi, I have question on SQLITE_CORRUPT, SQLITE_IOERR occur during database access. Question 1) How to get generated this kind of error for testing. 2) How do we make database safe from these error Or What is Possibility to access database after error. Cheers- Techi ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users