I deleted data from SQLite database table. If you open the database file in any SQL manager (e.g SQLiteStudio) deleted data is not present, but if you open database file in a text editor (e.g notepad++) deleted data is visible. Therefore there's a chance of restoring data, etc.
Example:
In the first picture SQLiteStudio is showing that deleted customer "Stan" is not seen. But binary file opened in Notepad++ shows customer "Stan".
Does anybody know how to make deleted data disappear from SQLite binary files?


To prevent this, execute PRAGMA secure_delete = ON:
When secure_delete is on, SQLite overwrites deleted content with zeros. The default setting for secure_delete is determined by the SQLITE_SECURE_DELETE compile-time option and is normally off. The off setting for secure_delete improves performance by reducing the amount of disk I/O. Applications that wish to avoid leaving forensic traces after content is deleted or updated should enable the secure_delete pragma prior to performing the delete or update, or else run VACUUM after the delete or update.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With