Hi Doug, On Wed, 2 Jan 2008 21:47:45 -0600, "Doug" <[EMAIL PROTECTED]> wrote:
>I have a customer that has a database that has somehow become corrupted. >I'm fairly certain he was on v3.4.1 but I'll double check. The database >isn't completely bad, I can look at the master table and one of the two >tables in the database. But if the second table is touched SQLITE_CORRUPT >is returned. Running sqlite3_analyzer returns the following (StatData is >the second table) > >Analyzing table StatData... > >ERROR: SQLITE_CORRUPT > >SQLITE_CORRUPT > >while executing > >"btree_next $csr" > >("foreach" body line 32) > >invoked from within > >"foreach {name rootpage} [db eval $sql] { > >puts stderr "Analyzing table $name..." > ># Code below traverses the table being analyzed (table name $name..." > >He is running with pragma synchronous off, but I thought that only opened up >the possibility for corruption if there was a power, OS, or hardware >failure, which he doesn't think occurred (it is Windows, and the server was >rebooted at some point.) Some versions of Windows are known to fail to flush buffers to disk at shutdown, because the system time-out "wait for hard disk to complete flush" is too short. Some applications don't listen to shutdown messages, and are simply killed by the operating system, without commiting their transaction, and without journal files, SLQite can't recover (rollback unfinished transactions) when the database is opened. Some tweaks to speedup shutdown kill services and applications too fast. Etc. http://www.sqlite.org/pragma.html#pragma_synchronous http://www.sqlite.org/atomiccommit.html >I suspect the answer is no, but is there any way to salvage any of the data? You could try the .dump command in the command line tool, but I'm afraid you're out of luck. >Thanks > >Doug -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------