beautypg.com

IBM Data Server DB2 User Manual

Page 232

background image

218

DB2 Deployment Guide

Figure 5-2 Two different table space mapping for ITSODB

Example 5-2 shows the database layout DDLs of ITSODB. Note that we drop the
default user tablespace

userspace1

, which is created implicitly when we create the

database using the CREATE DATABASE command. We remove the table space
because it is not used.

Example 5-2 ITSODB layout - buffer pool and table spaces

CREATE BUFFERPOOL ITSO_BP IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 4 K;

CREATE REGULAR TABLESPACE ITSO1 PAGESIZE 4 K MANAGED BY DATABASE USING ( FILE
'/db2/ts/itsodb/itso1.ts' 50M) AUTORESIZE YES BUFFERPOOL ITSO_BP;

CREATE REGULAR TABLESPACE ITSO2 PAGESIZE 4 K MANAGED BY DATABASE USING ( FILE
'/db2/ts/itsodb/itso2.ts' 50M) AUTORESIZE YES BUFFERPOOL ITSO_BP;

DROP TABLESPACE USERSPACE1;

If the raw devices are used for the container, you have to create the device for
the containers before creating the table spaces. The DDL for table space might
require modification, because the devices on the target systems might differ from
the devices on the source system.

ITSO_BP

ITSO_TS2

STAFF

ITSO_TS1

DEPT

EMPLOYEE

ADEFUSR

ITSO1.ts

ITSO2.ts

ITSO_BP

ITSO_TS2

STAFF

ITSO_TS1

DEPT

EMPLOYEE

ADEFUSR

ITSO1.ts

ITSO2.ts

ITSO2.ts