database disk image is malformed

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

database disk image is malformed

Jan Kandziora
Hello all,

I'm using sqlite3.2.7 and the tcl interface for my cash desk application
TkKasse. Now a user of TkKasse got this serious problem with his cash
register database.

The cash register data is stored in a sqlite3 database with standard settings,
which is now about 2MB in size. They store the database on an USB memory
stick, which failed (I think). Fortunately, at least they made backups every
4..5 days, but now they ask me if it is possible to recover the cash register
data of the last few days. It's about 400 records of ~0.5..1k each record.

Now I have the database and a .journal file in the archive they sent to me.
A .dump only brought back data that is in the backup, too. The pragma
integrity_check; displayed:

*** in database main ***
Multiple uses for byte 330 of page 1359
Multiple uses for byte 569 of page 1450
On tree page 1257 cell 21: Child page depth differs
On tree page 1257 cell 22: Child page depth differs
On tree page 1257 cell 54: invalid page number -1922301952
On tree page 1257 cell 54: Child page depth differs
On tree page 1257 cell 55: Child page depth differs
On tree page 1257 cell 94: invalid page number -1908867072
On tree page 1257 cell 94: Child page depth differs
On tree page 1257 cell 95: invalid page number -1908736000
On tree page 1257 cell 96: Child page depth differs
On tree page 1257 cell 97: invalid page number -1908408320
On tree page 1257 cell 97: Child page depth differs
On tree page 1257 cell 98: invalid page number -1908146176
On tree page 1257 cell 99: Child page depth differs
On tree page 1257 cell 106: invalid page number -1907294208
On tree page 1257 cell 106: Child page depth differs
On tree page 1257 cell 107: Child page depth differs
Multiple uses for byte 356 of page 1257
Page 6 is never used
Page 7 is never used
Page 8 is never used
Page 9 is never used
Page 10 is never used
Page 11 is never used
Page 12 is never used
Page 13 is never used
Page 14 is never used
Page 15 is never used
Page 16 is never used
Page 17 is never used
Page 18 is never used
Page 19 is never used
Page 20 is never used
Page 21 is never used
Page 22 is never used
Page 23 is never used
Page 24 is never used
Page 25 is never used
Page 26 is never used
Page 1213 is never used
Page 1268 is never used
Page 1320 is never used
Page 1321 is never used
Page 1322 is never used
Page 1325 is never used
Page 1326 is never used
Page 1327 is never used
Page 1336 is never used
SQL error: database disk image is malformed

Any pointers what to try? I would even try a hex editor or write some code
code if that helps.

Kind regards,

        Jan