Hi Stephen,
 
Many thanks for your response.
 
The database had been working fine. It is actually the second time this has
happened - but luckily our application is not in production yet. Yes, I saw
that thread you are referring to. I think our problem might be different. 
 
When I do a "select * from sqlite_master;" I get the same response.
 
i.e. "Error: malformed database schema - near ")""
 
I am thinking the best thing might be to upgrade to the latest version of
sqlite3. All the same, I would like to know what has happened. I looked on
sqlite.org, but could not find a reference to any way or any tools I can use
to analyse my database file to see what is wrong.
 
Is there no such tool for sqlite3?
 
Cheers
Mark


  _____  

From: Stephen Oberholtzer [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 09, 2008 10:39 AM
To: [EMAIL PROTECTED]; General Discussion of SQLite Database
Subject: Re: [sqlite] Error: malformed database schema - near ")"



On Fri, Aug 8, 2008 at 5:21 PM, Mark Easton <[EMAIL PROTECTED]> wrote:


Hi,

We are using SQLite version 3.3.8 on Debian linux. Every now and again we
are getting corrupted databases. We suspect it is because the computer is
being turned off mid database operation.

We have given full permissions to the folder the database is in and to the
database itself.

The most important question - is how can I recover this database? When I
type in  "pragama integrity_check" it still returns the error "Error:
malformed database schema - near ")"".


I seem to recall someone else having a similar problem, once.

Can you open the database and do "select * from sqlite_master;", then sanity
check the "sql" column for syntax errors?

Several months ago, someone had managed to create a bunch of tables with an
extra "," at the end due to a parser bug, and when they upgraded the new
parser rejected the old schema's SQL.


-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE


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

Reply via email to