On Nov 19, 2010, at 12:17, Pavel Ivanov wrote:

>>        1. When is it acceptable for sqlite to leave a corrupt database that 
>> can't be used?
> 
> It's never acceptable. SQLite specifically written and tested to
> manager "out of disk space" errors appropriately without database
> corruption.

        Yes, this is the argument I've been making, and it kind of comes back 
to me when stuff is corrupt.  :/  Then people ask me why I don't just make 
something better.  While I do think I could build something that fit our 
application a little better, my confidence in sqlite is higher than whatever I 
come up with over the weekend.

>>        I've got the data moved off to the side after it broke.
> 
> Did you move journal along with database? If not you made a big
> mistake. If it's not deleted yet and you didn't change anything in the
> database you can close all connections to it, put journal nearby and
> run command line utility again. After that integrity check should be
> okay.

        I didn't actually do the move, but I've been told all of the files came 
together while the application was shut down.  There is no journal.

        I've read the shell history and found that it appears that someone 
copied the files out from under the application while it was still running.  
This copy is what was corrupt.  We later removed the original and replaced them 
with their copy.

        So, yay sqlite, confidence restored (now just wait for the data to be).

>>        2. Is there any way to recover the data that didn't get corrupt 
>> (which should be lots)?
> 
> If there's no way to restore journal then you can only try .dump
> command from command line utility.


        Thank you for the suggestion.  This looks like it's going to be helpful 
to get a lot of the data out.

-- 
Dustin Sallings

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

Reply via email to