Administration Guide

Definition of Initial Table Spaces

When a database is created, three table spaces are defined:

Note:When you first create a database no user temporary table space is created.

If you do not specify any table space parameters with the CREATE DATABASE command, the database manager creates these table spaces using system managed storage (SMS) directory containers. These directory containers are created in the subdirectory created for the database (see Database Directories). The extent size for these table spaces is set to the default.

To define initial table spaces using the Control Center:
  1. Expand the object tree until you see the Databases folder.
  2. Right-click the Databases folder, and select Create --> Database Using Wizard from the pop-up menu.
  3. Follow the steps to complete this task.

To define initial table spaces using the command line, enter:

   CREATE DATABASE <name>
     CATALOG TABLESPACE
       MANAGED BY SYSTEM USING ('<path>')
       EXTENTSIZE <value> PREFETCHSIZE <value>
     USER TABLESPACE
       MANAGED BY DATABASE USING (FILE'<path>' 5000,
                                  FILE'<path>' 5000)
       EXTENTSIZE <value> PREFETCHSIZE <value>
     TEMPORARY TABLESPACE
       MANAGED BY SYSTEM USING ('<path>')
     WITH "<comment>"

If you do not want to use the default definition for these table spaces, you may specify their characteristics on the CREATE DATABASE command. For example, the following command could be used to create your database on OS/2:

   CREATE DATABASE PERSONL
     CATALOG TABLESPACE
       MANAGED BY SYSTEM USING ('d:\pcatalog','e:\pcatalog')
       EXTENTSIZE 16 PREFETCHSIZE 32
     USER TABLESPACE
       MANAGED BY DATABASE USING (FILE'd:\db2data\personl' 5000,
                                  FILE'd:\db2data\personl' 5000)
       EXTENTSIZE 32 PREFETCHSIZE 64
     TEMPORARY TABLESPACE
       MANAGED BY SYSTEM USING ('f:\db2temp\personl')
     WITH "Personnel DB for BSchiefer Co"

In this example, the definition for each of the initial table spaces is explicitly provided. You only need to specify the table space definitions for those table spaces for which you do not want to use the default definition.

The coding of the MANAGED BY phrase on the CREATE DATABASE command follows the same format as the MANAGED BY phrase on the CREATE TABLESPACE command. For additional examples, see Creating a Table Space.

Before creating your database, see Designing and Choosing Table Spaces.


[ Top of Page | Previous Page | Next Page ]