Database tracing with details

24 views
Skip to first unread message

Ertan Küçükoglu

unread,
Apr 17, 2021, 6:31:11 PM4/17/21
to firebird...@googlegroups.com
Hello,

I am using FirebirdSQL 2.5.9.latest on Windows OS.

I would like to trace one specific database in the system. Configuration is set and it is working.

My firebird.conf has following line:
AuditTraceConfigFile = fbtrace.conf

My fbtrace.conf has following section:
<database %[\\/]mydatabase.fdb>
  enabled true
  log_filename mydatabase.trc
  max_log_size 0
  log_statement_start true
  log_statement_finish true
  log_context true
  log_sweep true
</database>

When I run delete statement it is logged as following:
Statement 50:
-------------------------------------------------------------------------------
delete from accountingreceipt where entrydate >= ?

param0 = date, "2020-01-01"


When I run select statement it is logged as following:
Statement 56:
-------------------------------------------------------------------------------
select * from accountingreceipt where entrydate >= ?

param0 = date, "2019-01-01"


Is there any parameter to be added in the above section that will also show me info like fetch count, duration, affected rows etc?

Thanks & Regards,
Ertan Küçükoğlu

Dimitry Sibiryakov

unread,
Apr 18, 2021, 5:17:19 AM4/18/21
to firebird...@googlegroups.com
18.04.2021 00:30, Ertan Küçükoglu wrote:
> Is there any parameter to be added in the above section that will also show me info like
> fetch count, duration, affected rows etc?

All possible parameters are listed and described in fbtrace.conf. Perhaps you need
print_perf parameter.

--
WBR, SD.

Ertan Küçükoglu

unread,
Apr 18, 2021, 6:31:39 AM4/18/21
to firebird...@googlegroups.com
Hello,

I think "log_context" is the one I am looking for. Moreover, I had to set "time_treshold" to 0 for fast executing queries to be logged. Below worked fine for me.

  enabled true
  log_filename mydatabase.trc
  max_log_size 0
  log_connections true
  connection_id 0
  log_statement_start true
  log_statement_finish true
  log_context true
  print_perf false
  time_threshold 0
  log_sweep true

Thanks & Regards,
Ertan Küçüokoğlu


Dimitry Sibiryakov <s...@ibphoenix.com>, 18 Nis 2021 Paz, 12:17 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/d0f2bdfb-7e55-bafe-386a-41488d3d3171%40ibphoenix.com.
Reply all
Reply to author
Forward
0 new messages