> 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.
Thanks again, Simon, I am using ubuntu 9.04. I installed sqlite3 by using apt-get install sqlite3 and got sqlite3 version 3.6.10. I have not updated sqlite from version 3.6.10 to version 3.6.12 yet. But, I have tried .dump by following the instructions on <http://www.sqlite.org/sqlite.html>. I created a new database by using $ echo '.dump' | sqlite3 hq.db | gzip -c > hq.dump.gz $ zcat hq.dump.gz | sqlite3 hq3.db Then, I did pragma integrity_check and vacuum on the new database. Before I ran vacuum, the pragma integrity check returns OK. After I ran vacuum, I still got errors when I ran pragma integrity_check. Also, the number of rows of table firmsret11 reduces to 2. $ sqlite3 hq3.db SQLite version 3.6.10 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> pragma integrity_check; ok sqlite> vacuum; sqlite> select count(*) from firmsret11; 2 sqlite> pragma integrity_check; *** in database main *** On tree page 19 cell 20: Child page depth differs On tree page 19 cell 21: Child page depth differs On tree page 3301422 cell 103: Child page depth differs On tree page 16011 cell 0: 2nd reference to page 15965 On tree page 16011 cell 1: 2nd reference to page 15966 On tree page 16011 cell 2: 2nd reference to page 15967 On tree page 16011 cell 3: 2nd reference to page 15968 On tree page 16011 cell 4: 2nd reference to page 15969 On tree page 16011 cell 5: 2nd reference to page 15970 On tree page 16011 cell 6: 2nd reference to page 15971 On tree page 16011 cell 7: 2nd reference to page 15972 On tree page 16011 cell 8: 2nd reference to page 15973 On tree page 16011 cell 9: 2nd reference to page 15974 On tree page 16011 cell 10: 2nd reference to page 15975 On tree page 16011 cell 11: 2nd reference to page 15976 On tree page 16011 cell 12: 2nd reference to page 15977 On tree page 16011 cell 13: 2nd reference to page 15978 On tree page 16011 cell 14: 2nd reference to page 15979 On tree page 16011 cell 15: 2nd reference to page 15980 On tree page 16011 cell 16: 2nd reference to page 15981 On tree page 16011 cell 17: 2nd reference to page 15982 On tree page 16011 cell 18: 2nd reference to page 15983 On tree page 16011 cell 19: 2nd reference to page 15984 On tree page 16011 cell 20: 2nd reference to page 15985 On tree page 16011 cell 21: 2nd reference to page 15986 On tree page 16011 cell 22: 2nd reference to page 15987 On tree page 16011 cell 23: 2nd reference to page 15988 On tree page 16011 cell 24: 2nd reference to page 15989 On tree page 16011 cell 25: 2nd reference to page 15990 On tree page 16011 cell 26: 2nd reference to page 15991 On tree page 16011 cell 27: 2nd reference to page 15992 On tree page 16011 cell 28: 2nd reference to page 15993 On tree page 16011 cell 29: 2nd reference to page 15994 On tree page 16011 cell 30: 2nd reference to page 15995 On tree page 16011 cell 31: 2nd reference to page 15996 On tree page 16011 cell 32: 2nd reference to page 15997 On tree page 16011 cell 33: 2nd reference to page 15998 On tree page 16011 cell 34: 2nd reference to page 15999 On tree page 16011 cell 35: 2nd reference to page 16000 On tree page 16011 cell 36: 2nd reference to page 16001 On tree page 16011 cell 37: 2nd reference to page 16002 On tree page 16011 cell 38: 2nd reference to page 16003 On tree page 16011 cell 39: 2nd reference to page 16004 On tree page 16011 cell 40: 2nd reference to page 16005 On tree page 16011 cell 41: 2nd reference to page 16006 On tree page 16011 cell 42: 2nd reference to page 16007 On tree page 16011 cell 43: 2nd reference to page 16008 On tree page 16011 cell 44: 2nd reference to page 16009 On tree page 16011 cell 45: 2nd reference to page 16010 On tree page 16011 cell 46: 2nd reference to page 16012 On tree page 16011 cell 47: 2nd reference to page 16013 On tree page 16011 cell 48: 2nd reference to page 16014 On tree page 16011 cell 49: 2nd reference to page 16015 On tree page 16011 cell 50: 2nd reference to page 16016 On tree page 16011 cell 51: 2nd reference to page 16017 On tree page 16011 cell 52: 2nd reference to page 16018 On tree page 16011 cell 53: 2nd reference to page 16019 On tree page 16011 cell 54: 2nd reference to page 16020 On tree page 16011 cell 55: 2nd reference to page 16021 On tree page 16011 cell 56: 2nd reference to page 16022 On tree page 16011 cell 57: 2nd reference to page 16023 On tree page 16011 cell 58: 2nd reference to page 16024 On tree page 16011 cell 59: 2nd reference to page 16025 On tree page 16011 cell 60: 2nd reference to page 16026 On tree page 16011 cell 61: 2nd reference to page 16027 On tree page 16011 cell 62: 2nd reference to page 16028 On tree page 16011 cell 63: 2nd reference to page 16029 On tree page 16011 cell 64: 2nd reference to page 16030 On tree page 16011 cell 65: 2nd reference to page 16031 On tree page 16011 cell 66: 2nd reference to page 16032 On tree page 16011 cell 67: 2nd reference to page 16033 On tree page 16011 cell 68: 2nd reference to page 16034 On tree page 16011 cell 69: 2nd reference to page 16035 On tree page 16011 cell 70: 2nd reference to page 16036 On tree page 16011 cell 71: 2nd reference to page 16037 On tree page 16011 cell 72: 2nd reference to page 16038 On tree page 16011 cell 73: 2nd reference to page 16039 On tree page 16011 cell 74: 2nd reference to page 16040 On tree page 16011 cell 75: 2nd reference to page 16041 On tree page 16011 cell 76: 2nd reference to page 16042 On tree page 16011 cell 77: 2nd reference to page 16043 On tree page 16011 cell 78: 2nd reference to page 16044 On tree page 16011 cell 79: 2nd reference to page 16045 On tree page 16011 cell 80: 2nd reference to page 16046 On tree page 16011 cell 81: 2nd reference to page 16047 On tree page 16011 cell 82: 2nd reference to page 16048 On tree page 16011 cell 83: 2nd reference to page 16049 On tree page 16011 cell 84: 2nd reference to page 16050 On tree page 16011 cell 85: 2nd reference to page 16051 On tree page 16011 cell 86: 2nd reference to page 16052 On tree page 16011 cell 87: 2nd reference to page 16053 On tree page 16011 cell 88: 2nd reference to page 16054 On tree page 16011 cell 89: 2nd reference to page 16055 On tree page 16011 cell 90: 2nd reference to page 16056 On tree page 16011 cell 91: 2nd reference to page 16057 On tree page 16011 cell 92: 2nd reference to page 16058 On tree page 16011 cell 93: 2nd reference to page 16059 On tree page 16011 cell 94: 2nd reference to page 16060 On tree page 16011 cell 95: 2nd reference to page 16061 On tree page 16011 cell 96: 2nd reference to page 16062 Dose anyone know what is going on here? Thanks. Best, Jia On Sat, Oct 31, 2009 at 3:28 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > 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 > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users