Afficher/masquer le menu
Liens Ecyseo
  • Tags cloud
  • Daily
  • Pictures wall
  • Search
  • Display options
    • Links per page :
    • 20 links
    • 50 links
    • 100 links
  • RSS Feed
  • Login

J'ai besoin d'intimité. Non pas parce que mes actions sont douteuses, mais parce que votre jugement et vos intentions le sont.

5204 links 

page 1 / 1

Liste des liens

Sergei Dorogin's technical blog: SQLiteException "database disk image is malformed" - Librement Shaarli
2016-06-15 22:50 - permalink -

Merci pour le partage. Je recopie l'astuce ici :
Réparer une base sqlite corrompue.
So, something's broken.
I executed a query like select * from {table} for each table in the database and all of them was executed successfully except one. This one caused the exactly same error I saw before -database disk image is malformed. But in spite of error I got data from this table.

So if I can read data then I can recreate my database.
I started searching for a way how to dump data from the database into a SQL-script with INSERTs. This post helped me a lot.
I needed to download SQLite shell. This tool allows to export data in many forms including INSERTs.
I run sqlite3.exe storage.data where "storage.data" is my corrupted database file.
The following script exports all content (as INSERTs) with schema into "dump_all.sql" file:

sqlite> .mode insert
sqlite> .output dump_all.sql
sqlite> .dump

Then exit (Ctrl-C, Ctrl-Z or ".exit") and run again: sqlite3.exe storage.fixed.data, where "storage.fixed.data" is name of non-existing file for my resurrected database.
The following script reads commands from "dump_all.sql" script file and recreates all database.

sqlite> .read dump_all.sql

After this procedure I got a new database file with all content from the corrupted file.

code SQLite
- http://www.librement-votre.fr/shaarli/?D3lHhg
page 1 / 1


Tags


  • shaarli
  • wikipedia

Tags cloud

Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation
Affiches "loi aviva" créées par Geoffrey Dorne le 13 Mai, 2020 - Mastodon 1 - Mastodon 2