On Sun, Apr 10, 2011 at 9:36 PM, Samuel Neff <srneff.li...@gmail.com> wrote:

> I'm sorry, my statement was misleading.  I'm referring to immediately after
> our application is closed.
>
> We're seeing that even if the application is gracefully shut down, the -wal
> and -shm files are still there.  In order to clear them I need to open the
> database files with sqlite3.exe and issue a "pragma wal_checkpoint".
>

The -wal and -shm are deleted when the last connection to the database
closes.  If you are having -wal and -shm files left over, that implies that
you are not closing all your database connections before you exit.


>
> I'm testing on Windows 7 with ASP.NET applications.
>
> Thanks,
>
> Sam
>
>
>
> On Sun, Apr 10, 2011 at 9:10 PM, Simon Slavin <slav...@bigfraud.org>
> wrote:
>
> >
> > On 11 Apr 2011, at 2:04am, Samuel Neff wrote:
> >
> > > I'm interested in hearing anyone's experiences of using WAL journal
> mode
> > on
> > > technical support.  We often have to copy databases to attach to
> customer
> > > reports and if the someone were to copy the database file while there
> is
> > an
> > > active -wal file then we would very likely be missing the most
> up-to-date
> > > data in the copy.  I'm not sure if we can rely on support to issue a
> > pragma
> > > wal_checkpoint prior to doing the copy.
> >
> > My understanding is that no matter what journaling mode you're using, a
> > straight copy of the data file is not 'safe' while the database is open.
>  If
> > you want to backup the data, keep the database closed, or use the special
> > SQLite backup API.
> >
> > Simon.
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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

Reply via email to