Consultor Eletrônico



Kbase P16346: How to determine the database size using Prostrct Statistics command
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/13/2009
Status: Verified

GOAL:

How to determine the database size using Prostrct Statistics

GOAL:

How to use Prostrct Statistics?

GOAL:

How to obtain information regarding the structure of a database?

GOAL:

How to get the usage information from each extent of the database

GOAL:

How to determine the number of records per block for a database without using the log file?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Database

FIX:

Prostrct statistics shows various information regarding a database from DB, BI and AI block sizes to actual location of files for the database. This utility is also used to identify information regarding the number of records for a block and if the database is using Type I or Type II storage areas. The data provided by this utility can also be used to identify amount of blocks being utilized by the database, verses the amount of blocks allocated for use by the database.

Starting in Progress 9.1E04, OpenEdge 10.0B05 and 10.1A, the prostrct statistics utility can be run online as well as offline. Prior to these versions, it can only be run offline. When the utility is ran online a message is displayed to stdout which will indicate that the database is in use in update mode, therefore the data is being accessed in a -RO (Read Only) manner.

Command Syntax: prostrct statistics <dbname> (this will send the output to the screen) of you can use > filename to redirect the output to a file).

Example: prostrct statistics sports2000 > sports2000.out

The following is an example of the prostrct statistics output (notice the warnings that the database is in update mode) of a database that is in a multi-user mode:

Warning: another user is using this database in update mode.
Accessing the database with -RO may give unexpected results. (1531)
WARNING: Before-image file of database sports2000 is not truncated. (1552)
Storage Utilization Statistics
Database: sports2000
Primary data block size: 8192
BI block size: 8192
AI block size: 8192
Database Physical structure information

Statistics for Area: Control Area
Files in Area: Control Area
/sports2000.db 655360
Database Block Usage for Area: Control Area
Active blocks: 5
Data blocks: 5
Free blocks: 0
Empty blocks: 75
Total blocks: 80
Extent blocks: 1
Records/Block: 64
Cluster size: 1
Statistics for Area: Primary Recovery Area
Files in Area: Primary Recovery Area
/sports2000.b1 2228224
Statistics for Area: Schema Area
Files in Area: Schema Area
/sports2000.d1 1703936
Database Block Usage for Area: Schema Area
Active blocks: 203
Data blocks: 203
Free blocks: 0
Empty blocks: 5
Total blocks: 208
Extent blocks: 1
Records/Block: 64
Cluster size: 1
Statistics for Area: Employee
Files in Area: Employee
/sports2000_7.d1 393216
/sports2000_7.d2 131072
Database Block Usage for Area: Employee
Active blocks: 14
Data blocks: 14
Free blocks: 0
Empty blocks: 50
Total blocks: 64
Extent blocks: 2
Records/Block: 64
Cluster size: 1
Statistics for Area: Inventory
Files in Area: Inventory
/sports2000_8.d1 655360
/sports2000_8.d2 786432
Database Block Usage for Area: Inventory
Active blocks: 160
Data blocks: 160
Free blocks: 0
Empty blocks: 16
Total blocks: 176
Extent blocks: 2
&.nbsp; Records/Block: 64
Cluster size: 1
Statistics for Area: Cust_Data
Files in Area: Cust_Data
/sports2000_9.d1 393216
/sports2000_9.d2 131072
Database Block Usage for Area: Cust_Data
Active blocks: 22
Data blocks: 22
Free blocks: 0
Empty blocks: 42
Total blocks: 64
Extent blocks: 2
Records/Block: 64
Cluster size: 1
Statistics for Area: Cust_Index
Files in Area: Cust_Index
/sports2000_10.d1 393216
/sports2000_10.d2 131072
Database Block Usage for Area: Cust_Index
Active blocks: 15
Data blocks: 15
Free blocks: 0
Empty blocks: 49
Total blocks: 64
Extent blocks: 2
Records/Block: 64
Cluster size: 1
Statistics for Area: Order
Files in Area: Order
/sports2000_11.d1 1310720
/sports2000_11.d2 1441792
Database Block Usage for Area: Order
Active blocks: 327
Data blocks: 327
Free blocks: 0
Empty blocks: 9
Total blocks: 336
Extent blocks: 2
Records/Block: 64
Cluster size: 1
Statistics for Area: Misc
Files in Area: Misc
/sports2000_12.d1 393216
/sports2000_12.d2 131072
Database Block Usage for Area: Misc
Active blocks: 22
Data blocks: 22
Free blocks: 0
Empty blocks: 42
Total blocks: 64
Extent blocks: 2
Records/Block: 64
Cluster size: 1
Database Block Usage Summary
Active blocks: 768
Data blocks: 768
Free blocks: 0
Empty blocks: 288
Extent blocks: 14
Total blocks: 1056
NO FULL BACKUP HAS BEEN DONE. (6943)

.