Subject Re: Log transaction ID
Author Fabrice Aeschbacher
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
> Hi,
>
> > gstat can show transaction numbers (OAT, Next transaction).
> >
> > But how do I find out the transaction number corresponding to the
> > current transaction (i.e., to a given isc_tr_handle) ?
> >
> > I need this to help finding out which is the query corresponding to
> > the OAT.
>
> With Firebird 1.5, CURRENT_TRANSACTION

In DSQL / PSQL, yes.

But a C program normally starts a transaction (thus becomimg a
transaction handle, isc_tr_handle), and then executes a query within
this transaction, and then commits the transaction.

I want to (sys-)log the transaction number of each executed query, to
see which one is living too long. So I must be able to get the
transaction number from the isc_tr_handle.

Any ideas?

Best regards,
Fabrice Aeschbacher


>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL &
MS SQL
> Server.
> Upscene Productions
> http://www.upscene.com