db2 "ALTER TABLESPACE <TBSP> LOWER HIGH WATER MARK"
db2 "ALTER TABLESPACE <TBSP> REDUCE"
select substr(TBSP_NAME,1,35) as tbsp_name
, decimal((float(TBSP_USED_PAGES*TBSP_PAGE_SIZE))/1073741824,5,2) AS USED_GB
, decimal((float((TBSP_PAGE_TOP-TBSP_USED_PAGES)*TBSP_PAGE_SIZE))/1073741824,5,2) AS RECLAIMABLE_GB
from table (MON_GET_TABLESPACE(NULL,-1)) as mgt
where tbsp_type='DMS' and reclaimable_space_enabled = 1 and (TBSP_PAGE_TOP-TBSP_USED_PAGES) > 0
order by 3 desc
with ur
SELECT substr(TBSP_NAME,1,35) as TBSP_NAME, NUM_EXTENTS_MOVED, NUM_EXTENTS_LEFT
FROM TABLE(SYSPROC.MON_GET_EXTENT_MOVEMENT_STATUS('', -1))
where NUM_EXTENTS_LEFT > -1