Thanks I will try internal hard drive. This is not virtual machine , my application is running on linux ARM .
1) Make sure I need to check SQLITE_OK before i proceed to perform next task 2) Move the sqlite file to Internal hard drive 2) Add sqlite_3_config error log callback to find out which code cause the DB corrupt3) use showdb to check the corrupted db . (where to download the showdb ? ) Please suggest me what else I need to do to prevent DB corrupt happen again (1 & 2) or if the db does corrupt how can i analyse which code is causing the db corrupt . On Friday, June 24, 2016 1:27 AM, Scott Robison <sc...@casaderobison.com> wrote: On Thu, Jun 23, 2016 at 11:08 AM, mon siong <monsi...@yahoo.com> wrote: > > You have idea why the journal and shm file is corrupt ? > My first thought was a remote file system. My next instinct is to suspect the USB device or interface is suspect. Can you try it on an internal hard drive? Is this on a virtual machine of any sort? > > > From the previous Thread ( > http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/2016-January/063830.html), > you mention to use showdb to check the DB corrupt . Where to download the > showdb program ? > > > On Thursday, June 23, 2016 12:57 PM, mon siong <monsi...@yahoo.com> > wrote: > > > > Both processes on a single computer accessing a local file system. The > sqlite file is store in USB drive , and I notice if the database corrupt , > the journal or shm file is also corrupt . > > > > > On Thursday, June 23, 2016 12:48 PM, Scott Robison < > sc...@casaderobison.com> wrote: > > > On Jun 22, 2016 9:25 PM, "mon siong" <monsi...@yahoo.com> wrote: > > > > > > PHP use 3.7.7.1 and my c program use 3.8.4.3 . Different version of > sqlite is fine ? > > I tried WAL and Delete Journal Mode , both type cause the db to corrupt . > > > > Under which scenario, two different global variables will be used ? > > Is either process accessing the files over a networked file system or are > both processes on a single computer accessing a local file system? > > > > > > > On Thursday, June 23, 2016 11:13 AM, Simon Slavin < > slav...@bigfraud.org> wrote: > > > > > > > > On 23 Jun 2016, at 3:52am, mon siong <monsi...@yahoo.com> wrote: > > > > > PHP is using sqlite3 library ( > http://php.net/manual/en/book.sqlite3.php) > > > and C program is handle the sqlite using Serialized. > > > > > > Both of them are accessing the same DB at the same time . This can > cause DB corrupt ? > > > > No. These two work correctly together. You should get no corruption > from using these two together. > > > > Are you using any PRAGMA commands ? > > > > What is the result of "PRAGMA journal_mode" ? > > > > Simon. > > _______________________________________________ > > 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 > > > _______________________________________________ > 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 > -- Scott Robison _______________________________________________ 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