Showing posts with label sqlite3. Show all posts
Showing posts with label sqlite3. Show all posts

Tuesday, February 10, 2009

sqlite3 "database disk image is malformed" 错误

今天遇到 sqlite3 数据库错误 "database disk image is malformed",G 了一下,搞定,遂记录,帮人帮己。

假设原数据库名 abc.sqlite3

#bash
>>sqlite3 abc.sqlite3
然后
.output "_XB_D.tmp"
.dump
.quit

再建个新数据库 abc2.sqlite3

#bash
>>sqlite3 abc2.sqlite3
然后
.read "_XB_D.tmp"
.quit

然后修复原来的数据库名和文件权限,应该就没事了。

以上代码来自 文件 RepairUR.zip


参考 Forum of kinook