Consultor Eletrônico



Kbase P182270: How to calculate the number of clusters existing in the before-image log based off of the number of
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/22/2011
Status: Verified

GOAL:

How to calculate the number of clusters existing in the before-image log based off of the number of clusters shown in VST?

GOAL:

How to calculate the number of clusters existing in the before-image log?

GOAL:

How many clusters exist in the bi log?

GOAL:

How to calculate clusters in the before-image log?

GOAL:

How to calculate current before-image log size at any given point using VST?

GOAL:

How to calculate current before-image log size at any given point?

GOAL:

How much data is in the BI file?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x
OpenEdge Category: Database

FIX:


The following ABL code computes the total number of clusters that exist in the before-image log. There may be unused but allocated space after these clusters if fixed extents are being used.

FIND _areastatus no-lock where _areastatus-areanum = 3.
FIND _dbstatus no-lock.

DISPLAY _areastatus-hiwater *
_dbstatus._dbstatus-biblksize /
_dbstatus-biclsize /
1024
.

If you want to calculate the total size of the before-image log, you just have to multiply the number of clusters from the above result with the before-image cluster size (_dbstatus._dbstatus-biclsize). If you use the following ABL code you will get the total before-image log size in KB as the cluster size is stored as KB:

FIND _areastatus no-lock where _areastatus-areanum = 3.
FIND _dbstatus no-lock.
DISPLAY (_areastatus-hiwater *
_dbstatus._dbstatus-biblksize /
_dbstatus-biclsize /
1024) *
_dbstatus-biclsize
.