SQLite Forum

Reset database
If you only have read access to the DB, how could you reset its state? The whole point of a DBMS like SQLite is that it presents access to the current transaction state of the DB. Rolling it back to a prior state is a transaction (or cancellation of all prior transactions) of its own, so it inherently implies write access.

I think you've got an [XY problem](https://xyproblem.info/) here. Instead of telling us what the problem's solution should look like, tell us what problem you're actually trying to solve, which led you to believe SQLite should have a way to do what you're asking.

If you open a read-only database, and it causes this "failure" of yours, why is rolling back to a fresh new database the right behavior, especially given that there is [explicit support][1] for opening the database read-only?

[1]: https://sqlite.org/c3ref/open.html