Kbase P21787: How to get similar information as the Progress 9.x _Areastatus in Progress 8.x
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/14/2009 |
|
Status: Verified
GOAL:
How to query similar informaton to the Progress 9.x _AreaStatus VST with Progress 8.x VST's
GOAL:
How to query free space in Progress 8.x multi-volume database files
GOAL:
4GL to query free space in Progress 8.x with VST's
GOAL:
How to find the high water mark in Progress 8.x
GOAL:
How to find the largest recid in a Progress 8.x database
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.2x
Progress 8.3x
FIX:
There is no _AreaStatus in the set of virtual system tables schemas, provided with PROGRESS Version 8.2.
To get a similar query result as the V9 _AreaStatus output, _DBStatus can be used instead for Progress 8.x database, as long as the VST's have been enabled.
To load the database with the V8.2 set of virtual system tables schemas run:
proutil db-name -C enablevst
before the database server is started. The total number of Virtual System Tables is 35.
NOTE: Virtual system tables, or schema tables, have no physical records until the database manager generates them at runtime. This enables a 4GL application to retrieve information as runtime data.
In order to monitor database growth, the true size of the Database needs to be gauged by monitoring how much of the allocated blocks are used up.
The following is an example of how this may be described:
/* START: Blocks - Space */
define variable per_full as decimal.
DEFINE FRAME f WITH 1 Column width 80.
FOR EACH _DbStatus NO-LOCK:
per_full = (1 - (_DbStatus-EmptyBlks / _DbStatus-TotalBlks)) * 100.
DISPLAY
_DbStatus._DbStatus-TotalBlks LABEL "Number of blocks allocated"
_DbStatus._DbStatus-HiWater LABEL "DB blocks HWM"
_DbStatus._DbStatus-Hiwater * 64 LABEL 'Highest RECID'
_DbStatus._DbStatus-EmptyBlks LABEL "Empty blocks"
_DbStatus._DbStatus-DbBlkSize LABEL 'BlockSize'
_DbStatus._DbStatus-Hiwater * _DbStatus._DbStatus-DbBlkSize LABEL 'Used space'
(_DbStatus._DbStatus-Totalblks - _DbStatus._DbStatus-Hiwater) * _DbStatus._DbStatus-DbBlkSize LABEL 'Avail space'
per_full format ">>>>>9.99" label "% Full" with Frame f.
END.
/* END: Blocks - Space */