Please note: tracing is safe, it can be started on the production, it does not affect the performance in case of using the recommended configuration below.
database { enabled = true time_threshold = 200 log_connections = true log_statement_finish = true log_errors = true log_initfini = false print_plan = true #explain_plan = false print_perf = true max_sql_length = 65000 max_arg_length = 240 max_arg_count = 50 }Store the file in the folder withpout spaces, for example, C:\temp\fbtrace30.conf, or /opt/fbtrace30.conf
fbtracemgr.exe -se service_mgr -user SYSDBA -pass masterkey -start -conf C:\temp\fbtrace30.confAs a result, you will see output in the command prompt, something like this
Trace session ID 2 started 2021-05-26T10:23:48.5690 (2996:00000000018E0040) ATTACH_DATABASE C:\HQBIRD\FIREBIRD30\SECURITY3.FDB (ATT_6189, SYSDBA:NONE, NONE,)
./fbtracemgr -se service_mgr -user SYSDBA -pass masterkey -start -conf /opt/fbtrace30.conf
fbtracemgr.exe -se service_mgr -user SYSDBA -pass masterkey -start -conf C:\temp\fbtrace30.conf > c:\temp\log1.log
./fbtracemgr -se service_mgr -user SYSDBA -pass masterkey -start -conf /opt/fbtrace30.conf > log1.logKeep it running to catch the problematic SQL queries for a while (the minimum is 3-4 minutes, recommended is 1 hour), and then interrupt the fbtracemgr with Ctrl-C.
Store the file in the folder withpout spaces, for example, C:\temp\fbtrace25.conf, or /opt/fbtrace25.confenabled true log_connections true log_statement_finish true log_errors true print_plan true print_perf true time_threshold 200 max_sql_length 65000 max_blr_length 500 max_dyn_length 500 max_arg_length 80 max_arg_count 50
fbtracemgr.exe -se service_mgr -user SYSDBA -pass masterkey -start -conf C:\temp\fbtrace30.confAs a result, you will see output in the command prompt, something like this
Trace session ID 2 started 2021-05-26T10:23:48.5690 (2996:00000000018E0040) ATTACH_DATABASE C:\HQBIRD\FIREBIRD30\SECURITY3.FDB (ATT_6189, SYSDBA:NONE, NONE,)
./fbtracemgr -se service_mgr -user SYSDBA -pass masterkey -start -conf /opt/fbtrace30.conf
fbtracemgr.exe -se service_mgr -user SYSDBA -pass masterkey -start -conf C:\temp\fbtrace30.conf > c:\temp\log1.log
./fbtracemgr -se service_mgr -user SYSDBA -pass masterkey -start -conf /opt/fbtrace30.conf > log1.logKeep it running to catch the problematic SQL queries for a while (the minimum is 3-4 minutes, recommended is 1 hour), and then interrupt the fbtracemgr with Ctrl-C.