How to merge contents of SQLite 3.7 WAL file into main database file How to merge contents of SQLite 3.7 WAL file into main database file sqlite sqlite

How to merge contents of SQLite 3.7 WAL file into main database file


From the command line, do this:

  1. sqlite3 MyDatabase.sqlite
  2. VACUUM;
  3. CTRL-D to exit the sqlite console.

Done!

The -wal file should now have a size of 0 and everything should be in your main database file.


In an app "DB Browser for SQLite" open a database and switch between Journal Mode from "WAL" to "Off" and tap a button "Apply", and switch back to "WAL".