On 31 Oct 2009, at 7:03pm, chen jia wrote:

> Before I ran vacuum, I ran pragma integrity_check; and got
> sqlite> pragma integrity_check;
> ok
>
> After I ran vacuum, I ran pragma integrity_check; again and got
> sqlite> pragma integrity_check;
> *** in database main ***
> On tree page 15 cell 36: Child page depth differs
> On tree page 15 cell 37: Child page depth differs
> On tree page 20 cell 1: Child page depth differs
> On tree page 3301422 cell 103: Child page depth differs
> On tree page 13623 cell 0: 2nd reference to page 13592
> On tree page 13623 cell 1: 2nd reference to page 13593

Although the first integrity_check says that there are no errors, it  
may be wrong.  I am not able to definitely tell what is wrong, so I am  
just guessing.  Your earlier post said you were running version  
3.6.10.  Please try to update to the latest version of SQLite  
available for your platform, but at least version 3.6.12.

You may wish to rescue as much data as possible out of your database  
file.  One way to do this is to open it in the command-line tool and  
use the '.dump' command to create a text file with the SQL commands in  
to recreate the database.  You can then create a new blank database  
file and use the '.read' command to run those SQL commands to make a  
new, uncorrupt database which /should/ have all your data in.  Please  
see the page

<http://www.sqlite.org/sqlite.html>

for examples of how to write output to a text file but one example  
would be

echo '.dump' | sqlite3 hq.db > hq.txt

You should be able to use VACUUM on the new database file without any  
problems.

Simon.

PS: Please allow replies to go to the mailing list as normal.  That  
way if one person gives you bad advice another person can see it and  
correct it.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to