ERROR: SQLite database is malformed 的解决方法


sqlite> pragma integrity_check;
Error: database disk image is malformed
sqlite> .mode insert
sqlite> .output mydb_export.sql
sqlite> .dump
sqlite> .exit

mv mydb.db mydb.db.original

sqlite3 mydb.db < mydb_export.sql
sqlite> analyze;
sqlite> .exit
This entry was posted in linux, Mac OS X.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">