Salesforce

How to write ABL code for a custom bi threshold warning

« Go Back

Information

 
TitleHow to write ABL code for a custom bi threshold warning
URL Name000044155
Article Number000165626
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All Supported Operating Systems
Other: VSTs
Question/Problem Description
When approaching the defined -bithold value a message will be written to the database log file warning that is getting close to the limit:
BI File size has grown to within 90 percent of the threshold value of 800.0 MBytes. (9240) 

How can the bithold limit be monitored
Can the bithold limit be customised to warn earlier than the lg file warning 9240?
What is the current value of the active bi cluster in regard to the bithold value set?
How to write ABL code to show how close the BI file is to hitting the database's -bithold value?
Which VST tables to use when trying to determine the percentage prior to hitting the -bithold value?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
From the outset: there is no VST value that shows the -bithold value.

Dynamically obtaining the -bithold value from when the database was started can be done by:
  • parsing the database startup line, parameter file (.pf),  or database log file.  Parsing external files is outside the scope of this article.
  • VST Queries: _Startup or _DbParams, _Servers 
For further information refer to Article: How to find what Database Startup Parameters values are used

The sample ABL code provided below demonstrates how to calculate and display two different scenarios:
  1. Display a message when the current BI usage goes past a certain percentage of the known bithold value
  2. Display the current percentage used, of the bithold value which is known
DEF VAR biThreshold AS DEC NO-UNDO INIT 200.  /* biThreshold value (MB)      */
DEF VAR warningPerc AS INT NO-UNDO INIT 80. /* Warning at % of biThreshold */

/* areanum 3 is the bi area */ 
FIND FIRST _AreaStatus WHERE _AreaStatus._areaStatus-areanum = 3. 
/*  Find the bi blocksize */
FIND FIRST _Logging NO-LOCK.

/*  Display if BI usage is past the specific warningPerc value  */
IF (_AreaStatus-Hiwater * _Logging._Logging-BiBlkSize) >= 
   (biThreshold * warningPerc) / 100 * 1024 * 1024 THEN 
    MESSAGE "Warning: BI Area is beyond " + STRING(warningPerc) + "% of BI Threshold!" 
      VIEW-AS ALERT-BOX. 


/*  Display the BI's current percentage of the biThreshold */
MESSAGE "BI Area is at "   
 STRING((_AreaStatus-Hiwater * _Logging._Logging-BiBlkSize) / (biThreshold * 1024 * 1024) * 100) +
        "% of the biThreshold."
    VIEW-AS ALERT-BOX.

 
Workaround
Notes
Keyword Phrase
Last Modified Date2/16/2021 5:20 PM

Powered by