1. Execute under the instance user user
DB2 CREATE DATABASE CPM ON/HOME/DB2INST1/CPM using codeset UTF-8 territory CN pagesize 32768
2. Empowering Smart Users
DB2 Connect to CPM
DB2 Grant connect on the database to user smart
DB2 Grant DBADM on the database to user smart
3. Create schema
DB2 CREATE Schema CPM authorization smart
4. Create a cache pool
DB2 CREATE Bufferpool "Cpmpool" IMMEDIATE SIZE 100000 numblockpages 0 PAGESIZE K;
5. Create a temporary table space
DB2 CREATE USER Temporary tablespace "TMPCPM" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize Automat IC bufferpool "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY OFF;
6.
DB2 CREATE LARGE tablespace "tsp_cpm" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic Buffe RPOOL "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;
7.
DB2 CREATE LARGE tablespace "Tsp_log" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic Buffe RPOOL "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;
8.
DB2 CREATE LARGE tablespace "Tsp_index" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic BUF Ferpool "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;
Guide data
DB2 set current schema CPM;
DB2 Creating a Database