Through the CA SYSVIEW FOR DB2 tool, we are trying to implement a monitoring of the DB2 Data Sets ext and extents. We need to check the amount of extents and extents of DB2 TableSpaces datasets and generate an alert.
The following example, where SELECT is returning Tablespaces with more than 27 DataSets, where the maximum is 31 for these Tablespaces.
select DBNAME, TSNAME, DSNUM, EXTENTS ,STATSTIME from SYSIBM.SYSTABLEPART
where TSNAME LIKE 'S%'
AND DSNUM > 27
order by DBNAME, TSNAME
with ur;
DBNAME TSNAME DSNUM EXTENTS STATSTIME
-------- -------- ----- ------- --------------------------
DFIN134 S134LOGE 28 21 2019-04-14 16:23:52.809173
DFIN519 S519LOGB 29 18 2019-04-14 21:28:50.876675