The following script exports all content (as INSERTs) with schema into “dump_all.sql” file: sqlite>. I run sqlite3.exe storage.data where “storage.data” is my corrupted database file. This tool allows to export data in many forms including INSERTs. I started searching for a way how to dump data from the database into a SQL-script with INSERTs. So if I can read data then I can recreate my database. But in spite of error I got data from this table. This one caused the exactly same error I saw before -”database disk image is malformed”. I executed a query like “select * from ” for each table in the database and all of them was executed successfully except one. It returned: *** in database main *** On page 9 at right child: invalid page number 8678 1 is never used. ![]() ![]() Usually this command should return “ok” but not is this case. Then I checked that there’s really problems - execute “ integrity check”: PRAGMA integrity_check ![]() It can be done in VS “Server Explorer”: just create a new connection and then choose “Change password” and enter blank one. I got the sqlite database file from our customer and removed password (we use encryption with password).
0 Comments
Leave a Reply. |