On 1/15/15, Dave Dyer <ddyer-sql...@real-me.net> wrote: > >> >> >>> it wasn't possible to drop the index in question >> >>what happened when you tried ? Were you using your own code or the SQLite >> shell tool ? > > sqlite shell tool. Same complaint, "database corrupted".
First type: ".log stdout" That will get you additional diagnostic information. Also try: "PRAGMA quick_check;" and "PRAGMA integrity_check;" for additional information about the problem. If damage is restricted to indexes, it can be repaired using "REINDEX;". More concerning is how the database got corrupted in the first place. That isn't suppose to ever happen. See https://www.sqlite.org/howtocorrupt.html for possible clues. > > >>My guess is that you actually have file-level corruption which just >> happened to corrupt data in an index page. Could have just as easily been >> a table page and you would have had more trouble recovering your data. > > Of course that's possible, but .dump produced what superficially > appeared to be a perfectly consistent text file. However, since > we're dealing with an "impossible" error, it's hard to say definitively. > >>A good approach for your situation might have been to use the SQLite shell >> tool to .dump your database to a text file, then to use .read to create a >> new database from those commands. But it may or may not have worked from >> your particular corrupt database. > > That's exactly what I did do. .read initially failed with a complaint > about the non-unique indexes (although once again, no indication which > index). A process of elimination identified the index, which eventually > allowed me to remove the duplicates, so .read could succeed. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users