Assignment of table spaces and index spaces to physical storage
You can store table spaces and index spaces in user-managed storage, SMS-managed storage, or in Db2-managed storage groups. (A storage group is a set of disk volumes.)
If you do not use SMS, you need to name the Db2 storage groups when you create table spaces or index spaces. Db2 allocates space for these objects from the named storage group. You can assign different partitions of the same table space to different storage groups.
The following figure shows how storage groups work together with the various Db2 data structures.
To create a Db2 storage group, use the SQL statement CREATE STOGROUP. Use the VOLUMES(*) clause to specify the SMS management class (MGMTCLAS), SMS data class (DATACLAS), and SMS storage class (STORCLAS) for the Db2 storage group.
After you define a storage group, Db2 stores information about it in the Db2 catalog. The catalog table SYSIBM.SYSSTOGROUP has a row for each storage group, and SYSIBM.SYSVOLUMES has a row for each volume in the group.
The process of installing Db2 includes the definition of a default storage group, SYSDEFLT. If you have authorization, you can define tables, indexes, table spaces, and databases. Db2 uses SYSDEFLT to allocate the necessary auxiliary storage. Db2 stores information about SYSDEFLT and all other storage groups in the catalog tables SYSIBM.SYSSTOGROUP and SYSIBM.SYSVOLUMES.
Example
Consider the following CREATE STOGROUP statement:
CREATE STOGROUP MYSTOGRP
VOLUMES (*)
VCAT ALIASICF;
This statement creates storage group MYSTOGRP. The asterisk (*) on the VOLUMES clause indicates that SMS is to manage your storage group. The VCAT catalog-name clause identifies ALIASICF as the name or alias of the catalog of the integrated catalog facility that the storage group is to use. The catalog of the integrated catalog facility stores entries for all data sets that Db2 creates on behalf of a storage group.
The data sets are VSAM linear data sets cataloged in the integrated catalog facility catalog that catalog-name identifies. For more information about catalog-name values, see Naming conventions in SQL.
IBM Storage Management Subsystem
Db2 for z/OS includes the Storage Management Subsystem (SMS) capabilities. A key product in the SMS family is the Data Facility Storage Management Subsystem (DFSMS). DFSMS can automatically manage all the data sets that Db2 uses and requires. If you use DFSMS to manage your data sets, the result is a reduced workload for Db2 database administrators and storage administrators.
You can experience the following benefits by using DFSMS:
- Simplified data set allocation
- Improved allocation control
- Improved performance management
- Automated disk space management
- Improved management of data availability
- Simplified data movement
Db2 database administrators can use DFSMS to achieve all their objectives for data set placement and design. To successfully use DFSMS, Db2 database administrators and storage administrators need to work together to ensure that the needs of both groups are satisfied.