Salesforce

How to find out the space utilization of a database?

« Go Back

Information

 
TitleHow to find out the space utilization of a database?
URL NameP102100
Article Number000133078
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to find out the space utilization of a database?
How to monitor database space usage
How to monitor database growth using VST's?
Monitoring Database growth with VST's?
How to track the growth of a Database using the Virtual System Tables?
Which Virtual System Tables can show how much a database is growing?
How can I tell which extents have data
Is there data in all the extents
How to find out the space utilization of a database extent
What is the utilization of the current database extent
How much space is left in the last fixed extent of an area
How to monitor a Progress database for available space
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
A.  For overall information, use PROMON to find the number of empty blocks and free blocks of the database:
  1. Promon <dbname>
  2. Enter option: R&D
  3. Option 1 Status Displays
  4. Option 1 Database.
Since Progress 9, all Progress/OpenEdge databases are multi-volume and an overall view of information is only useful for determining the current size of the database.

B. PROSTRCT STATISTICS can be used to monitor the space usage of extents in each storage area. The report provides detailed information such as the database name, DB/AI/BI block sizes, the number of active blocks (blocks with data and free blocks), the number of empty blocks, the total number of blocks allocated for the database, the character set and collation name for the database , and the date and time of the last full backup. Since Progress 9.1E04, OpenEdge 10.0B05 and 10.1A, PROSTRCT STATISTICS can be run whilst the database is online.

To use PROSTRCT STATISTICS:
Command:  prostrct statistics <db name>

The first section of the statistics report should look something like this:

Storage Utilization Statistics
Database: sports

Primary data block size: 4096
BI block size: 8192
AI block size: 8192

Look for the Database Block usage area to gather information about specific areas, for example:
   
Files in Area: Schema Area
C:\PROGRESS\WRK_91c\db\sports.d1 851968

Database Block Usage for Area: Schema Area

Active blocks: 204
Empty blocks: 4
Extent blocks: 1
Total blocks: 208
Records/Block: 32
  • The line (C:\PROGRESS\WRK_91c\db\sports.d1 851968) reports the total size of the first extent in the Schema Area (sports.d1) is 8519689
  • The first part of the report showed that the data block size is 4096 or 4k.
  • The total number of blocks is 208.
  • 204 blocks are active. Multiply the number of active blocks by the block size 204 x 4096 = 835584 (816k) are used.
  • Since there are 4 empty blocks, use the same math to find the available space. 4 x 4096 = 16384 (16k) is available.

3. For more detailed information by Storage Area, use a 4GL procedure and query the _AreaStatus Virtual System Table (VST).

The following ABL code example will display the Area Name, Total Blocks and the High Watermark for that area:
 
FOR EACH _AreaStatus:
    DISPLAY _AreaStatus-AreaName LABEL "Area Name"
    _AreaStatus-TotBlocks LABEL "Total Blocks"
    _AreaStatus-Hiwater LABEL "High Watermark"
    _AreaStatus-TotBlocks - _AreaStatus-Hiwater LABEL "Empty" (SUM).
END.
For an extended code example using _AreaStatus to determine which extent the current High Water Mark is at, refer to Article  Sample VST code to monitor extents utilization  

The _AreaStatus VST reports correctly on areas with only 1 RM Chain (ie Type I Storage Areas), for Type II Storage Areas, refer to Article VST's to monitor space in a Type II Storage Area?   

4.   Run DBANALYS reports. Refer to Article  How to run the dbanalys command and interpret the data being obtained?   
Workaround
Notes

References to Written Documentation:

OpenEdge Documentation:
OpenEdge Data Management: Database Administration, Chapter 27, "Virtual System Tables"

Progress Articles:

 How to run the dbanalys command and interpret the data being obtained?
 How to determine the database size by using PROSTRCT STATISTICS
 Explanation of RM blocks and Free blocks.
 Sample VST code to monitor extents utilization  

Keyword Phrase
Last Modified Date11/20/2020 7:25 AM

Powered by