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