Kbase 34176: Sample Code to Determine the Database High-Water Mark
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Solution ID: P4176
GOAL:
How to monitor the database storage area high-water mark using VST
FIX:
With the introduction of areas in Progress Version 9, you must monitor the high-water mark for each individual area to ensure that sufficient space is available to extend the database on a per area basis. Disregarding the high-water mark on a per area basis could result in abnormal shutdown of the database due to an inability to extend within an area. The formula to determine the overall Database high-water mark is:
Overall High-water Mark = Total Database blocks - Total Empty blocks
The formulas and code below are for the overall view of the database. Similar information can be seen listed at the tail end of a PROSTRCT statistics command issued against an offline database. This same code is simply facilitating capturing overall totals while the database is in multi-user mode.
-- Sample Code for Overall Database Totals:
FOR EACH _DBSTATUS WITH SIDE-LABELS:
DISPLAY _DBSTATUS._DBSTATUS-DBBLKSIZE SKIP
_DBSTATUS._DBSTATUS-EMPTYBLKS SKIP
_DBSTATUS._DBSTATUS-FREEBLKS SKIP
_DBSTATUS._DBSTATUS-TOTALBLKS SKIP.
END.
-- Sample Code to report Area Specific Totals:
FOR EACH _AREASTATUS WITH SIDE-LABELS:
DISPLAY _AREASTATUS._AREASTATUS-AREANUM SKIP
_AREASTATUS._AREASTATUS-AREANAME SKIP
_AREASTATUS._AREASTATUS-TOTBLOCKS SKIP
_AREASTATUS._AREASTATUS-HIWATER SKIP
_AREASTATUS._AREASTATUS-EXTENTS SKIP
_AREASTATUS._AREASTATUS-LASTEXTENT SKIP
_AREASTATUS._AREASTATUS-FREENUM SKIP
_AREASTATUS._AREASTATUS-RMNUM SKIP.
END.