I recently had a similar problem,  not wanting to fall back to a week
old dump of the database, what I did was to command line ".dump"ed the
defective database and attempt a reload.
I only had two problem tables and luckily these seldom change,  for
these I went back to the week old backup and cut them out of the dump
file and applied them to the newly created database. Now I
integrity_check more often.

On Tue, Feb 23, 2010 at 3:54 AM, Pavel Ivanov <paiva...@gmail.com> wrote:
>> How can i recover this kind of DB, is it possible? and is there any way
>> to avoid these
>> unused pages, will enable auto_vacuum solve the problem ?
>
> 'VACUUM' is not designed to recover malformed database. Yes, there are
> some kinds of problems that can be eliminated during vacuuming, but
> not all of them. And automatic vacuuming will never guarantee you
> protection against database corruption. When properly used SQLite will
> protect from database corruption itself. If you've got corrupted
> database it means that you have either bad application or your
> database file resides on some bad file system.
>
>
> Pavel
>
> On Tue, Feb 23, 2010 at 5:33 AM,  <ramesh.kotab...@wipro.com> wrote:
>> Hi All,
>>
>> I found the DB corruption (malformed database), reporting some unused
>> pages,
>> please find the below trace,
>>
>> *** in database main ***
>> Main freelist: 21 of 21 pages missing from overflow list starting at 0
>> Page 1604: sqlite3BtreeInitPage() returns error code 11
>> Page 1461 is never used
>> Page 1468 is never used
>> Page 1469 is never used
>> Page 1472 is never used
>> Page 1473 is never used
>> Page 1474 is never used
>> Page 1475 is never used
>> Page 1478 is never used
>> Page 1480 is never used
>> Page 1482 is never used
>> Page 1484 is never used
>> Page 1485 is never used
>> Page 1486 is never used
>> Page 1488 is never used
>> Page 1489 is never used
>> Page 1491 is never used
>> Page 1517 is never used
>> Page 1531 is never used
>> Page 1536 is never used
>> Page 1578 is never used
>> Page 1581 is never used
>>
>> I tried to recover the DB, by running "vacuum", its failed again saying
>> "SQL error: database disk image is malformed".
>>
>> How can i recover this kind of DB, is it possible? and is there any way
>> to avoid these
>> unused pages, will enable auto_vacuum solve the problem ?
>>
>> I am using 3.5.8 version. and DB size is 1.6M
>>
>> Thanks in advance.
>>
>> Regards,
>> Ramesh
>>
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments to 
>> this message are intended for the exclusive use of the addressee(s) and may 
>> contain proprietary, confidential or privileged information. If you are not 
>> the intended recipient, you should not disseminate, distribute or copy this 
>> e-mail. Please notify the sender immediately and destroy all copies of this 
>> message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient should 
>> check this email and any attachments for the presence of viruses. The 
>> company accepts no liability for any damage caused by any virus transmitted 
>> by this email.
>>
>> www.wipro.com
>> _______________________________________________
>> 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
>



-- 
Jim "Jed" Dodgen
j...@dodgen.us
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to