How To
Summary
This shows how to use a Database SQL statement to summarize each Database on the system and how much storage it is using.
Objective
To get a quick summary of each Database on the system and how much storage each takes.
ASPs 1 (system) through ASP 32 makes up one Database
Each Pimary Independent Auxiliary Pool (IASP) + any secondary IASPs associated with it, make up additional databases.
Environment
This is using the ASP_INFO Table function, documented at:
https://www.ibm.com/docs/en/i/7.5?topic=services-data-area-info-view
Steps
select
(select rdb_name from qsys2.asp_info where asp_number = 1)
as Database_name,
sum(TOTAL_CAPACITY - TOTAL_CAPACITY_AVAILABLE) as storage_used_MB
from qsys2.asp_info
where asp_number < 33
union all
select
rdb_name as Database_name,
sum(TOTAL_CAPACITY - TOTAL_CAPACITY_AVAILABLE) as storage_used_MB
from qsys2.asp_info
where ASP_NUMBER > 32
group by rdb_name
|
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSB2F9","label":"DB2 Query Manager and SQL Development Kit for i5\/OS"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
07 May 2024
UID
ibm17150408