I tested with millions of records. Sqlite is stable and reliable. It is
suitable for my application. So, I have chosen.
But in customers place, I am getting corruptions. Within 6 months I got 4
corruptions. I do integrity check when app launch. But, critical data is
there with corrupted database. How can I recover it without backup.

bit more details:

1. Application installing in users machine.
2. Configuration maintains in database in local computer.
3. Application related data stored in database when running in local
computer.
4. Users related data(critical) stored in database in local computer.

Database integrity is very very fine when app launches. In runtime, due to
hardware or my logic error(using smart pointers boost/std), sqlite database
got corrupted. Now, backup is mandatory for me.

this is integiry_check result for corrupted db:

sqlite> PRAGMA integrity_check;
*** in database main ***
Page 255: btreeInitPage() returns error code 11
On tree page 970 cell 5: Child page depth differs
Page 252: unable to get the page. error code=1
Page 249: unable to get the page. error code=1
Page 246: unable to get the page. error code=1
Page 244: unable to get the page. error code=1
Page 239: unable to get the page. error code=1
Page 236: unable to get the page. error code=1
Page 233: unable to get the page. error code=1
Page 180: unable to get the page. error code=1
Page 229: unable to get the page. error code=1
Page 226: unable to get the page. error code=1
Page 223: unable to get the page. error code=1
Page 220: unable to get the page. error code=1
Page 218: unable to get the page. error code=1
Page 214: unable to get the page. error code=1
Page 211: unable to get the page. error code=1
Page 208: unable to get the page. error code=1
Page 205: unable to get the page. error code=1
Page 203: unable to get the page. error code=1
Page 194: unable to get the page. error code=1
Page 197: unable to get the page. error code=1
Page 200: unable to get the page. error code=1
Page 112: unable to get the page. error code=1
On tree page 1832 cell 11: Child page depth differs
Page 1101: unable to get the page. error code=1
On tree page 1832 cell 12: Child page depth differs
Page 1181: unable to get the page. error code=1
Page 1331: unable to get the page. error code=1
Page 1377: unable to get the page. error code=1
Page 1426: unable to get the page. error code=1
Page 2475: unable to get the page. error code=1
Page 2759: unable to get the page. error code=1
Page 2890: unable to get the page. error code=1
Page 2927: unable to get the page. error code=1
Page 2709: unable to get the page. error code=1
Page 2375: unable to get the page. error code=1
Page 2129: unable to get the page. error code=1
Page 1199: unable to get the page. error code=1
Page 1833: unable to get the page. error code=1
Page 7: unable to get the page. error code=1
Page 8: unable to get the page. error code=1
Page 5: unable to get the page. error code=1
Page 6: unable to get the page. error code=1
Page 4: unable to get the page. error code=1
Page 2: unable to get the page. error code=1
Page 3: unable to get the page. error code=1
Page 1: unable to get the page. error code=1
Page 9 is never used
Page 10 is never used
Page 16 is never used
Page 21 is never used
Page 22 is never used
Page 23 is never used
Page 24 is never used
Page 25 is never used
Page 26 is never used
Page 28 is never used
Page 30 is never used
Page 31 is never used
Page 33 is never used
Page 34 is never used
Page 35 is never used
Page 36 is never used
Page 37 is never used
Page 38 is never used
Page 39 is never used
Page 40 is never used
Page 41 is never used
Page 42 is never used
Page 43 is never used
Page 44 is never used
Page 46 is never used
Page 47 is never used
Page 49 is never used
Page 51 is never used
Page 54 is never used
Page 55 is never used
Page 56 is never used
Page 57 is never used
Page 58 is never used
Page 59 is never used
Page 60 is never used
Page 61 is never used
Page 62 is never used
Page 63 is never used
Page 64 is never used
Page 65 is never used
Page 66 is never used
Page 67 is never used
Page 68 is never used
Page 69 is never used
Page 70 is never used
Page 71 is never used
Page 72 is never used
Page 73 is never used
Page 74 is never used
Page 75 is never used
Page 76 is never used
Page 77 is never used

Any inputs?


On Tue, Dec 11, 2012 at 2:16 PM, Simon Slavin <slav...@bigfraud.org> wrote:

>
> On 11 Dec 2012, at 7:00am, dd <durga.d...@gmail.com> wrote:
>
> >  I don't have any clue. Two databases are corrupted. First one, while
> > inserting 20,000 records suddenly sqlite thrown disk io error at 4,000
> > record. No clue.
> >
> >  Second database corrupted when my application crashed. But that time,
> > second database was not opened.
> >
> >  So, I am planning to choose backup solution instead of investigating
> > corruption.
>
> That seems silly.  Unless you run an integrity-check just before you do a
> backup you will be backing up corrupted databases.  You will restore a copy
> from your backup and find that it too is corrupt.  And as you put more and
> more data into a database both integrity-check and backup get slower and
> slower.  You really don't want to set up a working system that depends on
> them.
>
> There are literally hundreds of millions of installations of SQLite.
>  Perhaps half a billion.  Every released version undergoes three kinds of
> testing of the very strictest kind.  The source code is public which means
> there are thousands of experienced programmers who look through it and
> might notice and bad programming.  SQLite does not routinely corrupt
> databases.  I'm not saying that it never happens but on this mailing list
> it's unusual to find reports of corruption that aren't the result of
> hardware faults of bad programming in the code that /calls/ the SQLite API.
>  If you have either of these problems then you need to know about it.  For
> all you know you have a faulty hard disk drive or even just a loose
> connection somewhere in your computer.
>
> That process where you insert 20,000 records ?  That looks ideal.  Do it a
> hundred times.  See if you can stimulate another fault.
>
> Simon.
> _______________________________________________
> 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

Reply via email to