Subject | Re: Log transaction ID |
---|---|
Author | Fabrice Aeschbacher |
Post date | 2004-04-21T16:37:45Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
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
<m.tonies@u...> wrote:
> Hi,In DSQL / PSQL, yes.
>
> > 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
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
>MS SQL
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL &
> Server.
> Upscene Productions
> http://www.upscene.com