SQLite Forum

Trace queries from external application on SQLite file
Login
It's not possible in general, if you do not control that application.  
SQLite is an *embedded* database, so it runs within the application  
itself, so without full control of the source of that app, *no can do*.

Unless that application depends on an SQLite **shared library**, as  
opposed to statically linked against it, and you provide you own  
SQLite shared-lib that intercepts all calls. But good luck doing that :)

On Linux, at the OS level, you can trace the IO done against the DB  
but that wouldn't tell you what SQL the app is running, only which  
pages it read, which could, if you knew what the page mean (via the  
`sqlite_analyzer` app, or DBSTAT virtual table) at least know which  
tables are accessed.

In all cases, that's a tall order... --DD