SQLiteが database disk image is malformed エラーを吐いた話



$ sqlite3 corrupted.db
sqlite> PRAGMA integrity_check;    # データが壊れているのを確認
Error: database disk image is malformed
sqlite> .mode insert
sqlite> .output dump_all.sql
sqlite> .dump
sqlite> (CTRL + D)                 # 一旦終了

$ sqlite3 new.db
sqlite> .read dump_all.sql         # 一見成功したように見える。
sqlite> .schema                    # けど空。




/**** ERROR: (11) database disk image is malformed *****/
/**** ERROR: (11) database disk image is malformed *****/
ROLLBACK; -- due to errors


$ vim dump_all.sql     # ROLLBACKをCOMMITに修正。
$ sqlite3 new.db
sqlite> .read dump_all.sql
sqlite> PRAGMA integrity_check;



3 thoughts on “SQLiteが database disk image is malformed エラーを吐いた話”

  1. I have been on a spiritual pilgrimage of sorts this year and thought I would make this part of that goal as well.
    Basic purpose of hiring a professional SEO Services Provider is to rank up your website on search engines and this is only possible when you will do something which
    is hard to do like placing back links and articles submissions which take a lot of time.
    The website should be checked and modified to ensure that
    it complies with the rules of main search engines.

    Feel free to visit my blog post :: seo services social media and website design

Leave a Reply

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