Board index » delphi » IB5.6 - Getting count of active transactions

IB5.6 - Getting count of active transactions

I tried using gstat -header, and simply subtracting the oldest active
value from (next transaction - 1) but I suspect that's not right.

Is there any way (either direct call to gds32.dll or other) to get an
absolute count of active transactions?

I also tried querying rdb$transactions, but for some reason that's
always empty...odd...

tia

 

Re:IB5.6 - Getting count of active transactions


Quote
> I tried using gstat -header, and simply subtracting the oldest active
> value from (next transaction - 1) but I suspect that's not right.

> Is there any way (either direct call to gds32.dll or other) to get an
> absolute count of active transactions?

Not that I know of.

--

With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

Quote
> I also tried querying rdb$transactions, but for some reason that's
> always empty...odd...

> tia

Re:IB5.6 - Getting count of active transactions


Quote
Craig Stuntz [TeamB] wrote:
> brenden walker wrote:

>>Is there any way (either direct call to gds32.dll or other) to get an
>>absolute count of active transactions?

>    Not in IB 5.6.  In IB 7 you can do it:

> SELECT
>   COUNT(*)
> FROM
>   TMP$TRANSACTIONS
> WHERE
>   TMP$STATE =

>    ...and then the states you're interested in: ACTIVE, LIMBO, COMMITTING,
> PRECOMMITTED.

>    -Craig

TMP$TRANSAACTIONS doesn't seem to exist in any of my
databases...attempts to select from it return table not found error.

Re:IB5.6 - Getting count of active transactions


Ooops, just noticed the first line of your response ;-)
Quote
Craig Stuntz [TeamB] wrote:
> brenden walker wrote:

>>Is there any way (either direct call to gds32.dll or other) to get an
>>absolute count of active transactions?

>    Not in IB 5.6.  In IB 7 you can do it:

> SELECT
>   COUNT(*)
> FROM
>   TMP$TRANSACTIONS
> WHERE
>   TMP$STATE =

>    ...and then the states you're interested in: ACTIVE, LIMBO, COMMITTING,
> PRECOMMITTED.

>    -Craig

Re:IB5.6 - Getting count of active transactions


Quote
>Is there any way (either direct call to gds32.dll or other) to get an
>absolute count of active transactions?

Only with IB 7 using the new performance monitoring features. Using
gstat -h over time you can get an idea of whether you have
transactions that are not committing or that are running for a long
time by watching the OAT and Next Transaction numbers but that is all.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:IB5.6 - Getting count of active transactions


Quote
brenden walker wrote:
> TMP$TRANSAACTIONS

        I presume that's a typo.

Quote
> doesn't seem to exist in any of my
> databases...attempts to select from it return table not found error.

        They must be ODS 11 DBs.  In other words, they must be created/restored by IB 7.  IB 7 can read IB 6.5 or 6 DBs (ODS 10.1 and 10, respectively), but you can't use performance monitoring features with them.

        To convert an IB 6.5 DB to an IB 7 DB, back it up and restore it in IB 7.

        HTH,

        -Craig

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
InterBase Perf. Monitor : http://delphi.weblogs.com/IBPerformanceMonitor
InterBase PLANalyzer 1.1: http://delphi.weblogs.com/IBPLANalyzer

Other Threads