Consultor Eletrônico



Kbase P102100: How to find out the utilization of a database?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/11/2008
Status: Verified

GOAL:

How to find out the utilization of a database?

GOAL:

How to monitor database usage

GOAL:

How to monitor database growth using VST's?

GOAL:

Monitoring Database growth with VST's?

GOAL:

How to know the growth of a Database using the Virtual System Tables?

GOAL:

How Virtual System Tables can show how much a database is growing?

GOAL:

How can I tell which extents have data

GOAL:

Is there data in all the extents

GOAL:

How to find out the utilization of a database extent

GOAL:

What is the utilization of the current database extent

GOAL:

How to get how much space left there is in the database

GOAL:

How to monitor a Progress database for available space

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10

FIX:

For a overall information, use promon to get the number of empty blocks and free blocks of the database

To get to this information using Promon:
1. Promon <dbname>
2. Enter option: R&D
3. Option 1 Status Displays
4. Option 1 Database.

Since Progress version 9, all Progress/OpenEdge databases are now multi-volume and an overall information is not enough. Its is important to monitor the usage of each variable extent and or the storage area.

For a more detail information by extents, use PROSTRCT STATISTICS. It displays 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 ,The date and time of the last full backup.

For a more detail information by Storage Area, use a 4GL program and query _AreaStatus Virtual System Tables (VSTs)..


To use PROSTRCT STATISTICS:

SYNTAX: 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) tells that the total size of the extension area sports.d1 is 8519689(6656).

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.


To use the Virtual System Tables (VSTs).

The following is a small 4GL program that will give you the Area Name, Total Blocks in that area, 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 "Free" (SUM).
END.