火车头发布时提示:查询未发数据时出错,停止发布: 数据库出错

文章目录[隐藏]

今天用火车头发布之前采集的数据,提示:查询未发数据时出错,停止发布数据时出错

用Sqlite Expert打开是可以Content表数据异常。我用方法二进行了修复,修复后改名为原来的名字

恢复正常,火车头可以发布。

方法一

使用sqlite3.exe 修复;

执行命令行命令,将你的数据库中的数据导出为sql语句文件
sqlite3 SpiderResult.db3
sqlite>.output tmp.sql
sqlite>.dump
sqlite>.quit

最后导入到一个新库中
sqlite3 mynew.db
sqlite>.read tmp.sql
sqlite>.quit

方法2

编程内可用的修复方法:
cmd执行命令行

//检测数据库是否损坏,如果没有损坏会输出ok
sqlite3.exe SpiderResult.db3 "PRAGMA integrity_check"
//导出旧库sql
sqlite3.exe SpiderResult.db3 .dump > tmp.sql
//创建新库
sqlite3.exe SpiderResult2.db3 ".read tmp.sql"

暂无评论

发表评论

您的电子邮件地址不会被公开,必填项已用*标注。

相关推荐