IBM 5655-DB2 Server User Manual


 
14 Storage Management with DB2 for OS/390
DB2 defined and managed spaces should be the choice by default. It is the easier
of these solutions and is adequate for most table and index spaces in the majority
of situations.
User defined table spaces provide more control of the data set placement and all
VSAM definition options are available. Examples of where user defined table
spaces may be required are:
Table spaces that require specific DFSMS classes
Table spaces with critical performance and availability requirements
(In general, table spaces with special requirements)
3.3.1 DB2 Defined and Managed
Figure 1 on page 14 shows an example of a DB2 defined table space. The
CREATE TABLESPACE resolves the physical allocation and defines this table
space to DB2. The STOGROUP DSN8G610 defines a set of volumes for the data
set and PRIQTY specifies the size in KB. Indexes are created with a CREATE
INDEX statement. The CREATE INDEX statement defines both the index and the
associated index space. The CREATE INDEX also loads the index with entries
that point to the data (index rows) unless the DEFER YES parameter is specified.
Figure 1. Creating a STOGROUP Defined Table Space
3.3.2 User Defined and Managed
Two steps are required to create user defined table spaces or index spaces.
1. The physical allocation is done with an IDCAMS DEFINE CLUSTER; this is
shown in Figure 2 on page 14.
Figure 2. User Defined Table Space: Step 1—Define the Cluster
2. The table space or index space must be defined to DB2. An example is shown
in Figure 3 on page 15. It must be noted that the high level qualifier, the
CREATE TABLESPACE PAOLOR11
IN DSN8D61A
USING STOGROUP DSN8G610
PRIQTY 20
SECQTY 20
ERASE NO
LOCKSIZE ANY LOCKMAX SYSTEM
BUFFERPOOL BP0
CLOSE NO
CCSID EBCDIC;
DEFINE CLUSTER -
( NAME(DB2V610Z.DSNDBC.DSN8D61A.PAOLOR1.I0001.A001) -
LINEAR -
REUSE -
VOLUMES(SBOX10) -
RECORDS(4096 50) -
SHAREOPTIONS(3 3) ) -
DATA -
( NAME(DB2V610Z.DSNDBD.DSN8D61A.PAOLOR1.I0001.A001) ) -
CATALOG(DS2V6)