On 23 Jan 2012, at 9:45am, Sreekumar TP wrote:

> -My journal mode is set to WAL, synchronous mode is NORMAL and Checkpoint
> mode is Manual.
> 
> Transactions are written to the WAL file, therefore, even if the WAL file
> is lost, I should be able to retrieve the database without
> corruption.(sacrificing some data ofcourse)   ?

The simplest way to get an uncorrupted database is to use the command-line tool 
to .dump your database file to SQL commands, then use the command-line tool to 
run those commands to make another database file.  This does not guarantee you 
a database that makes sense unless you used transactions correctly.  But it 
does guarantee you a database which will pass the corruption-check PRAGMAs.

> Moreover, I do know that there was no checkpoint in progress when the power
> was turned OFF. Hence  syncs should not be a problem ?

If you were using a modern-day standard computer then you have no idea when the 
computer was updating the hard disk.  All sorts of foreground tasks are running 
which might have held it up: print service, checking for new email, etc..  What 
you can hope for is that changes are written in the order they were made, which 
is something SQLite relies on to keep its database files uncorrupted.

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

Reply via email to