[sqlite] Disk-image malformed

2015-09-09 Thread Klaas V
Dear fellow users and developers of SQLite, sqlite> create table dual(dummy blob); sqlite> insert into dual values ('SQLite version 3.8.11.1 2015-07-29 20:00:57'); sqlite> create table z4usm1 as select (unicode(substr(type,2,1)) - 97) / 4 "zk", ...>name "zn", rootpage

Re: [sqlite] disk image malformed

2012-12-09 Thread dd
I do Integrity check every often. On Sun, Dec 9, 2012 at 5:07 PM, Simon Slavin wrote: > > On 9 Dec 2012, at 12:44pm, dd wrote: > > > Can I read the database when sqlite throws disk io or image malformed or > > other critical errors first time. I

Re: [sqlite] disk image malformed

2012-12-09 Thread Simon Slavin
On 9 Dec 2012, at 12:44pm, dd wrote: > Can I read the database when sqlite throws disk io or image malformed or > other critical errors first time. I cannot simulate these issues on my > machine. So, I need your suggestion. You should not continue to work with the

Re: [sqlite] disk image malformed

2012-12-09 Thread Kees Nuyt
On Sun, 9 Dec 2012 16:44:13 +0400, dd wrote: > Can I read the database when sqlite throws disk io or image malformed or > other critical errors first time. I cannot simulate these issues on my > machine. So, I need your suggestion. Here are a few suggestions to simulate

Re: [sqlite] disk image malformed

2012-12-09 Thread dd
Can I read the database when sqlite throws disk io or image malformed or other critical errors first time. I cannot simulate these issues on my machine. So, I need your suggestion. On Sun, Dec 9, 2012 at 4:40 PM, dd wrote: > Thank you Simon Slavin. > > > On Sun, Dec 9,

Re: [sqlite] disk image malformed

2012-12-09 Thread dd
Thank you Simon Slavin. On Sun, Dec 9, 2012 at 4:27 PM, Simon Slavin wrote: > > On 9 Dec 2012, at 12:10pm, dd wrote: > > > I have code in C++. Right now, I got this issue on Mac. > > Oh. Then you don't have to worry about Windows codepages. All

Re: [sqlite] disk image malformed

2012-12-09 Thread Simon Slavin
On 9 Dec 2012, at 12:10pm, dd wrote: > I have code in C++. Right now, I got this issue on Mac. Oh. Then you don't have to worry about Windows codepages. All your text is already in Unicode. >>> you still have faulty hardware or software > > faulty software means? (OS

Re: [sqlite] disk image malformed

2012-12-09 Thread dd
I have code in C++. Right now, I got this issue on Mac. >>you still have faulty hardware or software faulty software means? (OS or sqlite version) On Sun, Dec 9, 2012 at 3:37 PM, Simon Slavin wrote: > > On 9 Dec 2012, at 7:34am, dd wrote: > > >

Re: [sqlite] disk image malformed

2012-12-09 Thread Simon Slavin
On 9 Dec 2012, at 7:34am, dd wrote: > I have 10 databases. One database got disk io error, later it's used by > application without proper handling, so it's corrupted. > > After some days, one more database also corrupted without io error. Sqlite > returned error code 11.

Re: [sqlite] disk image malformed

2012-12-08 Thread dd
I have 10 databases. One database got disk io error, later it's used by application without proper handling, so it's corrupted. After some days, one more database also corrupted without io error. Sqlite returned error code 11. It's fully corrupted. Are these corruptions depend on other database

Re: [sqlite] disk image malformed

2012-12-07 Thread Simon Slavin
On 7 Dec 2012, at 1:36pm, dd wrote: > Thank you Simon. > > So I have to stop using database when error between 1 to 26. You have to stop when you get any code you do not have specific logic to handle. Here is the list of result codes:

Re: [sqlite] disk image malformed

2012-12-07 Thread dd
Thank you Simon. So I have to stop using database when error between 1 to 26. If I use new database connection (sqlite3*) for every query, will it cause disk io error? I am encrypting database with secret key. I changed page size also. Can sqlite handle encrypted database and different page

Re: [sqlite] disk image malformed

2012-12-06 Thread sqdev sqdev
The several cases of corrupted databases i mentioned all resulted from a newly created database. I do not reuse repaired databases with my application. The corrupted databases came from different computers and different users. 2012/12/6 Simon Slavin > > On 6 Dec 2012, at

Re: [sqlite] disk image malformed (Durga D)

2012-12-06 Thread Klaas V
If you made a backup in one of following ways yes: 1. SQLite's Internal command .backup  2. cp (or copy) command of your operating system's command line. > On Thu, Dec 6, 2012  Durga D wrote: Is there anyway to recover? > On Thu, Dec 6, 2012 at 10:23

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 7:57pm, dd wrote: > It's checking with OK, BUSY, 101 and some other errors. But not disk io, > image malformed errors. How to handle these errors in run time? these > databases have critical information about customers. We cannot stop > application. Any

Re: [sqlite] disk image malformed

2012-12-06 Thread dd
Databases integrity fine when application starts. These critical errors are introduced in run time. I cannot take backup of these databases also. space(memory) problem. On Fri, Dec 7, 2012 at 1:27 AM, dd wrote: > It's checking with OK, BUSY, 101 and some other errors. But

Re: [sqlite] disk image malformed

2012-12-06 Thread dd
It's checking with OK, BUSY, 101 and some other errors. But not disk io, image malformed errors. How to handle these errors in run time? these databases have critical information about customers. We cannot stop application. Any inputs? On Fri, Dec 7, 2012 at 1:20 AM, Simon Slavin

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 7:47pm, dd wrote: > No. I replaced with fresh database. I want to prevent these errors in our > customers place for future purpose. Run the integrity check every so often and see if the problem occurs again. Make sure that your program checks the

Re: [sqlite] disk image malformed

2012-12-06 Thread dd
No. I replaced with fresh database. I want to prevent these errors in our customers place for future purpose. On Fri, Dec 7, 2012 at 1:09 AM, Simon Slavin wrote: > > On 6 Dec 2012, at 7:30pm, dd wrote: > > > My multithreaded application do all

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 7:30pm, dd wrote: > My multithreaded application do all read/write operations. For each query, > it opens database connection and execute query then close connection. This > application executes plenty of records within a second. In this scenario, >

Re: [sqlite] disk image malformed

2012-12-06 Thread dd
I understand your points Simon. Let me explain scenario where I got this disk io error then my database got corrupted. My multithreaded application do all read/write operations. For each query, it opens database connection and execute query then close connection. This application executes plenty

Re: [sqlite] disk image malformed

2012-12-06 Thread dd
No Robert. It's on same machine -- multiple threads within process, TRUNCATE mode. On Fri, Dec 7, 2012 at 12:38 AM, Robert Myers wrote: > One thing I haven't seen anyone ask yet - are you putting this on a > network drive? > On 12/6/2012 10:52 AM, Durga D wrote: > > Hi, >

Re: [sqlite] disk image malformed

2012-12-06 Thread Robert Myers
One thing I haven't seen anyone ask yet - are you putting this on a network drive? On 12/6/2012 10:52 AM, Durga D wrote: > Hi, > > Is it possible to corrupt a single table among 10 tables in a database? > > Is it possible to corrupt some records among millions of records in a > table? > > Best

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 6:51pm, Durga D wrote: > Does disk io error is related to hardware issue? i mean, fsync() dint get > success on unix. so, this error may be thrown by sqlite. Is it? Disk IO is sometimes caused by a hardware issue, but it can be caused by trusting data

Re: [sqlite] disk image malformed

2012-12-06 Thread Durga D
Does disk io error is related to hardware issue? i mean, fsync() dint get success on unix. so, this error may be thrown by sqlite. Is it? On Fri, Dec 7, 2012 at 12:00 AM, Simon Slavin wrote: > > On 6 Dec 2012, at 6:13pm, Durga D wrote: > > > I

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 6:49pm, sqdev sqdev wrote: > Please have a look at the post I mentioned: > I ran "PRAGMA integrity_check" in the shell tool (SQLite CLI) and got > errors, but still, they don't tell me what caused the corruption. I did read it. The shell tool can't tell

Re: [sqlite] disk image malformed

2012-12-06 Thread sqdev sqdev
Please have a look at the post I mentioned: I ran "PRAGMA integrity_check" in the shell tool (SQLite CLI) and got errors, but still, they don't tell me what caused the corruption. 2012/12/6 Simon Slavin > > On 6 Dec 2012, at 6:38pm, sqdev sqdev

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 6:38pm, sqdev sqdev wrote: > Maybe this post might be of interest here: > http://sqlite.1065341.n5.nabble.com/malformed-database-schema-td65610.html > > I had several corrupted databases the last few days. Unfortunately, I > haven't found out the cause

Re: [sqlite] disk image malformed

2012-12-06 Thread sqdev sqdev
Maybe this post might be of interest here: http://sqlite.1065341.n5.nabble.com/malformed-database-schema-td65610.html I had several corrupted databases the last few days. Unfortunately, I haven't found out the cause yet. 2012/12/6 Durga D > I will run integrity check. >

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 6:13pm, Durga D wrote: > I suspect, linking among pages will be broken in sqlite database when disk > io error thrown by sqlite. Is it? This is one form of database corruption. But there are others. Sometimes it's just a few strange characters inside

Re: [sqlite] disk image malformed

2012-12-06 Thread Durga D
I will run integrity check. >>I would like to know, why sqlite throws disk io error while inserting records... I suspect, linking among pages will be broken in sqlite database when disk io error thrown by sqlite. Is it? On Thu, Dec 6, 2012 at 11:30 PM, Simon Slavin

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 5:23pm, Durga D wrote: > Is it (corruption) related error code 10? (disk io) > > I would like to know, why sqlite throws disk io error while inserting > records... It doesn't matter. Run an in integrity check:

Re: [sqlite] disk image malformed

2012-12-06 Thread Black, Michael (IS)
] disk image malformed i mean in second case. some records corrupted but not all. How to recover this? On Thu, Dec 6, 2012 at 10:27 PM, Durga D <durga.d...@gmail.com> wrote: > Is there anyway to recover? > > > On Thu, Dec 6, 2012 at 10:23 PM, Richard Hipp <d...@sqlite.org> w

Re: [sqlite] disk image malformed

2012-12-06 Thread Durga D
Is it (corruption) related error code 10? (disk io) I would like to know, why sqlite throws disk io error while inserting records... On Thu, Dec 6, 2012 at 10:43 PM, Simon Slavin wrote: > > On 6 Dec 2012, at 5:04pm, Durga D wrote: > > > i mean in

Re: [sqlite] disk image malformed

2012-12-06 Thread Simon Slavin
On 6 Dec 2012, at 5:04pm, Durga D wrote: > i mean in second case. some records corrupted but not all. How to recover > this? There's no fixed answer. It depends on which parts of the file are corrupt, and what they had written to them. If you used the shell tool on the

Re: [sqlite] disk image malformed

2012-12-06 Thread Durga D
i mean in second case. some records corrupted but not all. How to recover this? On Thu, Dec 6, 2012 at 10:27 PM, Durga D wrote: > Is there anyway to recover? > > > On Thu, Dec 6, 2012 at 10:23 PM, Richard Hipp wrote: > >> On Thu, Dec 6, 2012 at 11:52 AM,

Re: [sqlite] disk image malformed

2012-12-06 Thread Durga D
Is there anyway to recover? On Thu, Dec 6, 2012 at 10:23 PM, Richard Hipp wrote: > On Thu, Dec 6, 2012 at 11:52 AM, Durga D wrote: > > > Hi, > > > > Is it possible to corrupt a single table among 10 tables in a database? > > > > Is it possible to

Re: [sqlite] disk image malformed

2012-12-06 Thread Richard Hipp
On Thu, Dec 6, 2012 at 11:52 AM, Durga D wrote: > Hi, > > Is it possible to corrupt a single table among 10 tables in a database? > > Is it possible to corrupt some records among millions of records in a > table? > Yes. Yes. > > Best Regards, >

[sqlite] disk image malformed

2012-12-06 Thread Durga D
Hi, Is it possible to corrupt a single table among 10 tables in a database? Is it possible to corrupt some records among millions of records in a table? Best Regards, ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] disk image malformed with no system crash

2009-11-13 Thread Claudio Cilloni
Hi All. I'm new to Sqlite, and I'm getting some rare and random 'database disk image is malformed' error. I have no system crashes, power failures or filesystem corruption. My machine is a Linux Debian, ext3 filesystem running on a flash disk. I'm using Sqlite 3.6.19 through Python 2.6.2. I'm

Re: [sqlite] disk image malformed

2005-06-28 Thread Kevin Schmeichel
I recently reported a similar error. After upgrading to sqlite3, I noticed that I would occassionally get the "database disk image is malformed" errors using the library code. I just closed/reopened the db, retried the query and always had success on the retry. No idea why - D. Richard Hipp

[sqlite] disk image malformed

2005-06-28 Thread Leander Gillard
Hello, Just wondering why I get this error when trying to open the DB with the Binary interface. It has actually worked on the odd occasion. sqlite l_main.dbl Unable to open database "l_main.dbl": database disk image is malformed Regards, Leander