Regarding:  Problem:  Exception message: The database disk image is
malformed.

Ernany, I wasn't sure if you were commenting further on Joanne Pham's
database or were you writing because you have a similar problem with a
different database.

In either case, you both may want to refer to the very, very recent
thread in this list titled "Recovery Program"  (Sorry, no -- there is no
magic recovery utility).

It's possible your database(s) are unrecoverable and you'll have to
resort to your backup.

It might possibly be helpful, though, to try using the sqlite
command-line utility (sqlite3.exe on windows) and attempt to use the 
     .dump <table> 
command for each of your tables.   (Perhaps start out with a plain .dump
and see how far it gets -- you may be able to identify the problem table
that way.)

Someone recently had a corrupted database mentioned on this list -- and
when I played with it I could do a manual binary search to locate the
one (and only one) unreadable record in a particular table.

If the meta-data itself is damaged, though, you won't be able to dump
anything.

The source code allows you to specify a trap for detections of
"sqlite_corrupt" (the error code associated with your error) if you've
found some repeatible failure you want to debug.


For the future:

-- If you haven't already, you'll want to refer to the documenation for
"how to corrupt your database"
    http://www.sqlite.org/lockingv3.html

-- Be sure you're not using tempting fate by using inappropriate,
dangerous pragma settings.

-- Avoid opening the database across NFS if possible.

-- Keep good backups, of course.


Good luck.  Don't know if this has helped.

Donald
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to