SQLite 损坏 database disk image is malformed

来源:互联网 发布:python 多线程 返回值 编辑:程序博客网 时间:2024/05/16 01:04

SQLite数据库出现异常现象,打开数据显示”database disk image is malformed“

查了资料发现,数据库被损坏。发现到处都是一样的方法,但是不靠谱!!!

最终找到了一个 SQLite 修复工具,1下载SQLite Tools    1     

1 下载SQLite Tools

网址http://www.sqlite.org/download.html,下载文件sqlite-tools-win32-x86-3150200.zip

2  进行修复  

解压sqlite-tools-win32-x86-3150200.zip

点击sqlite.exe,进入DOS命令窗口,如下图所示:     

之后输入.open e:/project.db打开被损坏的数据库:

输入PRAGMA integrity_check,检查损坏的文件,可以不要;

输入.output  e:/sql.sql,保存SQL语句:

输入 .open e:/new.db新建数据库:

输入.read W:/Temp/t.sql 读入SQL语句:





0 0
原创粉丝点击