How to change SQLite DB journal_mode to WAL in Windows?

1.8k Views Asked by At

I'm writing a Java Swing application that works with a SQLite DB locally which syncs with an online MySQL DB from minute to minute and it's a thread. So even when the syncing process is ongoing the user should be able to change the data.

So I know I can do it by changing to journal mode WAL and i've done it in Linux. It worked perfectly. But in Windows it doesn't work. When I try to convert the journal mode using the statement PRAGMA journal_mode=WAL; it always returns delete not WAL

I've done a bit of research and i found this on SQLite web.

The journal_mode pragma returns a string which is the new journal mode. On success, the pragma will return the string "wal". If the conversion to WAL could not be completed (for example, if the VFS does not support the necessary shared-memory primitives) then the journaling mode will be unchanged and the string returned from the primitive will be the prior journaling mode (for example "delete").

How can I resolve this issue? For an example, can I change the DB VFS?

I'm using the Sqliteman to manage my DBs.

1

There are 1 best solutions below

0
On BEST ANSWER

Ok i just found out what was wrong. The problem was with Sqliteman. The windows version of the program cannot handle the DBs in WAL journal mode. Other applications can.

Problem solved. But, if somebody can find me a windows version of Sqliteman which works with WAL please direct me to that. Sqliteman is a huge time saver.