>> I had a power failure yesterday and an active database of
>> mine is now trashed.
>
> I'm curious how you got to this point. If the power failed during a
> transaction there should have been a rollback journal file beside the
> database file which the sqlite library would discover and use to undo
> all the changes in the partially complete transaction the next time 
> that
> database was opened. Did you perhaps delete the journal file before
> starting sqlite or your application after the power failure?

Where would the file be?  I don't see a file.  I didn't write the 
application, but it runs in Windows.  Under Windows does it get put 
somewhere "special" ...?  When I restarted the application it didn't 
give me any notice that anything was wrong; it was only after running it 
for a while that I noticed it was borked.  At that point I shut down the 
application, moved the database out of the way and restarted the 
application so I could work on the broken database while not losing any 
more data than I already had.

I suppose it could have found that file and applied it, but still wound 
up borked.  After applying it, it would have deleted it it so that it 
didn't do it again next time, right?

Someone else suggested this:

> sqlite3 old.db .dump | sqlite3 new.db

I guess I should have thought of that myself :-)

I was worried that the problems in the database would keep .dump from 
working ... I should have just tried it.  That gets me back to where I 
was just prior to the crash, so that's about the best I can hope for.

Thanks!  And thanks also for the pointer to REINDEX ...

/jordan 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to