Subject Re: Starting auditing session
Author
---In firebird-support@yahoogroups.com, <chris@...> wrote :

> I've started looking into Firebird tracing capabilities and there seems to
> be very little documentation on the topic besides the official manual and
> a few commercial applications that are well known.

  Does you read
https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-trace.html
and
https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-apiods-api.html#rnfb25-apiods-api-svctrace
?

> I am aware of the "fbtracemgr" utility but I would like to handle things
> myself.

  Good. Note, you need not "auditing" session but usual "user trace" session.
Audit is a bit different, read the docs, please.

> First of all: how do I start a tracing session? Is it a sql command that I
> call like a function or I select from like in a procedure?

  FIrst, you need to know how to work with Services API.
Second, read again
https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-apiods-api.html#rnfb25-apiods-api-svctrace

  Also, you can read source code of fbtracemgr
https://github.com/FirebirdSQL/firebird/blob/B2_5_Release/src/utilities/fbtracemgr/traceMgrMain.cpp

> Second: how do I feed Firebird the tracing session configuration file?
> Does it need to be a "physical" file on the same server as FB or can it be
> read from like STDIN?

  If you read docs, you know that trace configuration is sent as a part of SPB

Hope it helps,
Vlad