Most PRAGMA statements affect only the current database connection, which means that they have to be re-applied whenever the database has been opened.
However, the following PRAGMAs write to the database file, and can be executed at any time (but in some cases, not inside a transaction):
applica...