Topic: Code Place

Subtopic: DB2 for LUW

This script lists tablespaces that are candidates for conversion from SMS to DMS and from DMS regular to DMS large in support of a project to implement large record identifiers so that DB2 will store more rows per page. This effort could be part of a project to implement compression because table compression requires large record identifiers. (RIDS) db2 connect to Database echo "Listing candidate tablespaces for conversion." db2 -x "select TBSP_TYPE, sum(TBSP_USED_SIZE_KB) as TBSP_USED_SIZE_KB, char(TBSP_NAME,20) as TBSP_NAME, TBSP_CONTENT_TYPE, TBSP_PAGE_SIZE, TBSP_AUTO_RESIZE_ENABLED from sysibmadm.tbsp_utilization where TBSP_CONTENT_TYPE not like '%TEMP%' group by TBSP_TYPE, TBSP_NAME, TBSP_CONTENT_TYPE, TBSP_PAGE_SIZE, TBSP_AUTO_RESIZE_ENABLED" > FileName.dat sort FileName.dat > FileName.txt cat FileName.txt rm FileName.dat echo "Candidate tablespaces for conversion located in FileName.txt"

Click Here to Download

NOTE: These are only open to members of IDUG. If you are not a member, please CLICK HERE for more information.