How To Merge Contents Of SQLite 3.7 WAL File Into Main Database File
With WAL (Write-Ahead-Logging) enabled in SQLite 3.7 (which is the default for Core Data on iOS 7), how do I merge/commit the content from the -wal file back into the main database
Solution 1:
From the command line, do this:
sqlite3 MyDatabase.sqliteVACUUM;- 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.
Solution 2:
Do a checkpoint, i.e., execute PRAGMA wal_checkpoint.
Solution 3:
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".
Post a Comment for "How To Merge Contents Of SQLite 3.7 WAL File Into Main Database File"