You are welcome.    I was worried about the infinite loop I wrote. ;)

Hopefully you can track down the reason, I don't know anything about your
file but what you tell us. There are some things that you can do to help
track it down.

You didn't mention what version of sqlite you were using, programming
language, dev or target platform etc. This may be helpful to track it down,
or attract the interest of other list members more versed in an
implementation similar to  yours.

Also, if you have some sort of way of knowing the time the error was
written, if the file was exposed to users  etc. it may be helpful.     If
you have a copy of the corrupt header and look at it from the point of view
of "what program would write such a thing to my file?"    For example
"another program's" known file header, or (if the program was supposed to
append but didn't seek to the end before writing), some other stuff.

Have you ruled out your disk starting to fail?
Does corruption time co-relate to a power failure?  (Not all hard drives
tell the truth that the data is safely in the file.)
Is there a chance a user or other process opened the file, then closed it
saving its header over top of the sqlite one?

regards,
Adam





On Thu, Aug 18, 2016 at 1:24 PM, Matias Badin <mbadi...@gmail.com> wrote:

> Thanks  you very much! The information was very usefull.
> I can recover the database info now, overwritting the header array.
> Have you any information about how the header is corrupted? I would like to
> know the reason to resolve it.
> Thanks again!
>
> 2016-08-18 10:14 GMT-03:00 Adam Devita <adev...@verifeye.com>:
>
> > Good day,
> >
> > A few things that you can try
> > 1) One could download a hex editor and review the beginning of the file
> and
> > compare to https://www.sqlite.org/fileformat2.html . If some other
> program
> > has over-written the header,  you should be able to observe that,
> hopefully
> > identifying a program with a problem.
> >
> > 2) Back up you hard drive. Run hardware diagnostics.
> >
> > 3) Review https://www.sqlite.org/howtocorrupt.html
> >
> > 4) Do this list in reverse order. :)
> >
> >
> > regards,
> > Adam
> >
> >
> > On Thu, Aug 18, 2016 at 8:56 AM, Matias Badin <mbadi...@gmail.com>
> wrote:
> >
> > > Hi Everyone;
> > > I have a problem with a sqlite database that was working very good but
> > > suddenly started to give the message "File is encrypted or is not a
> > > database". Then I can´t access it and i have to replace it with a new
> > one.
> > >
> > > Can anyone help me with this problem?
> > > I don´t know how to re-open the database. I can´t access to the
> > information
> > > saved in it
> > > Thanks all;
> > > _______________________________________________
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > >
> >
> >
> >
> > --
> > --------------
> > VerifEye Technologies Inc.
> > 151 Whitehall Dr. Unit 2
> > Markham, ON
> > L3R 9T1
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
--------------
VerifEye Technologies Inc.
151 Whitehall Dr. Unit 2
Markham, ON
L3R 9T1
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to