How to capture Firebird SQL queries?
Firebird 2.5 added the trace API which can be used to track prepare and execution of statements and a number of other things. The tools included in Firebird for use of the trace API are rather basic, but it might well be sufficient for your needs. Be aware that by default the trace API limits the size of statements captured and logged, and it might take some time to tweak the trace configuration to get all information you need.
An example configuration is:
<database mydatabase.fdb>
enabled true
log_statement_prepare true
time_threshold 0
max_sql_length 65536
</database>
This should capture all statement prepares with the full SQL query in the database mydatabase.fdb
.
See for more information: Audit and Trace Services in Firebird 2.5.
There are several vendors who provide tools that utilize the trace API (for example FB Tracemanager by Upscene Productions), and as already mentioned in the comments, there is also FBScanner by IBSurgeon which acts as a proxy between the client and a Firebird server and allows you to record the traffic (including statements).
Related videos on Youtube
jakson
Updated on June 04, 2022Comments
-
jakson almost 2 years
Is there any way to capture SQL queries transmitted by old application created in Delphi/C++Builder + Firebird?
I don't have source code of that client app or access to (remote) database server.
-
nater about 9 yearsThe closest thing I've seen is FBScanner which is a proxy that records traffic.
-