# check ok tbsps
db2 "select varchar(tbsp_name, 30) as tbsp_name, tbsp_type, reclaimable_space_enabled, tbsp_free_pages from table (mon_get_tablespace(NULL,-2)) as t where reclaimable_space_enabled=1"
# check how much reclainble
db2 "select varchar(tbsp_name, 15) as tbsp_name, tbsp_free_pages, tbsp_page_top, tbsp_total_pages, tbsp_using_auto_storage from table (mon_get_tablespace(NULL,-2)) as t"
db2 “ALTER TABLESPACE <TSNAME> REDUCE MAX”
db2 “ALTER TABLESPACE <TSNAME> LOWER HIGH WATER MARK”
# monitor
db2 “select varchar(tbsp_name,30) as tbsp_name, last_extent, num_extents_moved, num_extents_left, total_move_time from table (mon_get_extent_movement_status(‘<TSNAME>’,-1)) AS T”
db2 “select varchar(tbsp_name, 30) as tbsp_name, tbsp_state from table (mon_get_tablespace(‘<TSNAME>’,-2)) as t”