Checkpoint Count

durgaprasad1538

New Member
Dear Team,

One assignment is assigned to our DBA team . "when transaction is running how to get the details for any changes in cluster count.

But I not able to get any information from any knowledge base or prokb.
Kindly help me on this.

Openedge 11.2 IBM Aix 7.1 servers and Enterprise edition.

Thanks......
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
You can get the logical size of the BI file (in clusters) from the _DbStatus VST. E.g.:

Code:
find dictdb._dbstatus no-lock.
display integer( ( _dbstatus-bisize * _dbstatus-biblksize / 1024 ) / _dbstatus-biclsize ) )
 

RealHeavyDude

Well-Known Member
I am not sure whether I completely understand your requirement ...

There is no way to find out the number of BI clusters used by a single transaction. You can only find out the actual number of clusters for _ALL_ transactions. The size of the BI on disk won't tell you the actual utilization. The actual utilization is based on the number of BI clusters in use.

To find out the actual number of BI clusters in use you need to know the lowest and the highest cluster numbers used by any transaction. The lowest number is rather easy, but the highes is rather tricky - you need to start a transaction yourself ...

This is just a code snippet to get the lowest and highest cluster number:
Code:
  txn-blk:
  do for SessionBuffer transaction on error undo, throw:

  /* Update something */
  create SessionBuffer.
  assign SessionBuffer.sessionIdSymbol = guid ( generate-uuid ).

  /* Fetch the transaction associated with my connection - the _Trans-Counter will give us the newest BI cluster */
  for first _MyConnection no-lock,
  first _Trans no-lock where _Trans._Trans-UsrNum = _MyConnection._MyConn-UserId:
  assign newestBeforeImageCluster = _Trans._Trans-Counter
  oldestBeforeImageCluster = newestBeforeImageCluster.
  end.

  /* The smallest value in the _Trans-Counter will give us the oldest BI cluster in use */
  for each _Trans no-lock where _Trans._Trans-State = 'ACTIVE' and _Trans._Trans-Counter > 0:
  if _Trans._Trans-Counter < oldestBeforeImageCluster then
  assign oldestBeforeImageCluster = _Trans._Trans-Counter.
  end.

  undo txn-blk, leave txn-blk.

  end.

From there you can go on and compare the number of used clusters with your maximum BI size to get the utilization.


Heavy Regards, RealHeavyDude.
 

TomBascom

Curmudgeon
I'm not sure why you need to start a TRX... you can find the highest *active* TRX in much the same way you found the lowest... There may be higher numbered "allocated" TRX but for the purpose of estimating BI "in use" I think the difference between highest & lowest *active* clusters works.
 

RealHeavyDude

Well-Known Member
Actually that is what the wizard of wizards himself proposed. Nevertheless, I did think about the alternative already and I don't see any reason why your approach should not work, but, I did not have time yet to try and test it. Therefore I am still with the "old" solution.
 
Top