Salesforce

Virtual System Table (VST) used to calculate database occupation

« Go Back

Information

 
TitleVirtual System Table (VST) used to calculate database occupation
URL NameP27398
Article Number000137293
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
Virtual System Table (VST) used to calculate database occupation
Overall Database Storage Area high-water mark (hiwater) calculation
How much space is available in each database extent?
When will I run out of space for database expansion?
How to calculate the amount of data within a last fixed extent?
When to add new extents ?
How to find the true size of the Database ?
How to monitor Database growth ?
How to find the HWM per Storage Area
Steps to Reproduce
Clarifying Information
Type I Storage Area
Error Message
Defect Number
Enhancement Number
Cause
Resolution

With the introduction of Type I Storage Areas in Progress 9, the high-water mark for each Area must be monitored to ensure that sufficient space is available to extend the database on a per Area basis. Disregard for the high-water mark on a per Area basis could result in abnormal shutdown of the database due to inability to extend within an Area. In addition to the availability of database extents to accommodate database growth, one should also consider the availability of disk space for database expansion. Refer to Article How much space do I have left for my database to grow?   

With the introduction of Type II Storage Areas in OpenEdge 10, the _AreaStatus VST reports correctly on Areas with only 1 RM Chain (ie Type I Storage Areas), but cannot be used to predict available space for multiple RM chains. Refer to Article VST's to monitor space in a Type II Storage Area?   

CURRENT-WINDOW:HEIGHT = 30.
CURRENT-WINDOW:WIDTH = 200.

/* how much of the TYPE I Storage Area is used up by allocated blocks (HWM)? 
What is the true size of the Database? 
​How fast is my database growing? iow: What is the real occupation? */

define variable v-prcnt_full as decimal format ">>9.99" label "% Full" no-undo.
define variable v-empty_blocks as decimal format ">>,>>>,>>9" label "Empty" no-undo.
define variable v-hiwater as decimal format ">>,>>>,>>9" label "Hiwater" no-undo.
define variable v-mb_used as decimal format ">>>,>>9.99" label "MB Used" no-undo.
define variable v-mb_avail as decimal format ">>>,>>9.99" label "MB Avail" no-undo.
define variable v-mb_tused as decimal format ">>>,>>9.99" label "Total MB used" initial 0.0 no-undo.
define variable v-mb_tavail as decimal format ">>>,>>9.99" label "Total MB avail" initial 0.0 no-undo.

/* output to sa.xml. */

FOR EACH _Area NO-LOCK:
 FIND _Areastatus WHERE _Areastatus-Areanum = _Area._Area-number NO-LOCK.

 v-hiwater = _AreaStatus-Hiwater.
 if v-hiwater = ? then v-hiwater = 0.0.

 v-empty_blocks = _AreaStatus-Totblocks - v-hiwater - _AreaStatus-Extents.

 v-prcnt_full = (1.0 - (v-empty_blocks / _AreaStatus-Totblocks)) * 100.0.
 
 v-mb_avail = v-empty_blocks / 1048576 * _Area-BlockSize.
 v-mb_tavail = v-mb_tavail + v-mb_avail.
     
 v-mb_used = v-hiwater / 1048576 * _Area-BlockSize.
 v-mb_tused = v-mb_tused + v-mb_used.

 DISPLAY
   _Area-name LABEL 'Name' format "x(21)"
     _Area-blocksize LABEL 'DBBlockSize'
  _AreaStatus-Extents LABEL '#Extents' format ">>9" 
  _AreaStatus-Lastextent LABEL "HWM extent" 
  v-hiwater
  v-empty_blocks
  _AreaStatus-Totblocks - _AreaStatus-Extents LABEL 'T.Blocks' FORMAT ">>,>>>,>>9"
  v-prcnt_full SKIP
  v-mb_used
  v-mb_avail WITH WIDTH 200.

END.

display v-mb_tused
    v-mb_tavail.
Workaround
Notes
References to Written Documentation

Reference to Progress Manuals:
Database Administration Guide and Reference:
PART III Reference - Chapter 20, "Virtual System Tables"

Progress Articles:
Keyword Phrase
Last Modified Date11/20/2020 7:24 AM

Powered by