< Day Day Up > |
The STOSPACE UtilityThe STOSPACE utility is executed on a STOGROUP or list of STOGROUP s. It populates the DB2 Catalog with table space and index data set DASD usage statistics. These statistics are culled from the appropriate ICF Catalog as indicated in the STOGROUP for which the STOSPACE utility is being executed. All space usage statistics stored in the DB2 Catalog are specified in terms of kilobytes (1024 bytes). JCL to execute the STOSPACE utility for all storage groups known to the DB2 system is in Listing 34.6. The (*) in the JCL can be replaced with either a single STOGROUP name or a list of STOGROUP names separated by commas ( enclosed in parentheses). Listing 34.6. STOSPACE JCL//DB2JOBU JOB (UTILITY),'DB2 STOSPACE',MSGCLASS=X,CLASS=X, // NOTIFY=USER //* //**************************************************************** //* //* DB2 STOSPACE UTILITY //* //**************************************************************** //* //UTIL EXEC DSNUPROC,SYSTEM=DSN,UID='STOSPACE',UTPROC=" //DSNUPROC.SYSIN DD * STOSPACE STOGROUP (*) /* // STOSPACE PhasesThe STOSPACE utility has three phases:
STOSPACE Locking ConsiderationsThe STOSPACE utility can be run concurrently with all utilities. STOSPACE GuidelinesWhen running the STOSPACE utility, use the following guidelines to ensure effective storage management. Run STOSPACE RegularlyThe STOSPACE utility should be run weekly for STOGROUP s to which highly active table spaces and indexes are assigned. It should be executed at least monthly for all STOGROUP s defined to the DB2 system. Be Aware of DB2 Catalog Updates Caused by STOSPACEThe STOSPACE utility updates the following DB2 Catalog tables and columns :
If the storage space value determined by STOSPACE is too large to fit in the SPACE column, the SPACEF column is used. If the SPACE column in the SYSIBM.SYSSTOGROUP table is after running the STOSPACE utility, consider dropping the STOGROUP , because no objects are currently defined for it. You can issue the following query to determine this: SELECT NAME, SPACE, SPACEF FROM SYSIBM.SYSSTOGROUP WHERE SPACE = 0 ORDER BY NAME Be careful, however, if your shop uses DFHSM to automatically migrate inactive data sets to tape. Issue the following query to be sure that no objects have been defined to the STOGROUP s with a SPACE value of : SELECT * FROM SYSIBM.SYSSTOGROUP ST WHERE NOT EXISTS (SELECT 1 FROM SYSIBM.SYSINDEXPART IP WHERE ST.NAME = IP.STORNAME) AND NOT EXISTS (SELECT 1 FROM SYSIBM.SYSTABLEPART TP WHERE ST.NAME = TP.STORNAME) If no objects are returned by this query, the STOGROUP s previously identified probably can be dropped. There is one more problem, however. If a STOGROUP used as the default storage group for an active database is dropped, future table space and index DDL must explicitly specify a STOGROUP rather than rely on the default STOGROUP for the database. This is not usually a problem because the recommendation is to explicitly specify every parameter when creating DB2 objects. You can use the following query to determine whether a STOGROUP is used as the default STOGROUP for a database: SELECT NAME FROM SYSIBM.SYSDATABASE WHERE STGROUP = 'STOGROUP'; Monitor DASD UsageRun the DB2 DASD usage queries (presented in Chapter 26) after successfully running the STOSPACE utility. This helps you monitor DASD used by DB2 objects. Now that you have your DB2 Catalog in order, look at several other types of DB2 utilities in Chapter 35, "Stand-alone Utilities and Sample Programs." |
< Day Day Up > |