一、建表空间和数据库
1.在db2ad、db2db和db2ap上均执行:
db2set db2comm=tcpip
db2set db2codepage=1386
2.新建数据库:
db2 create db <dbname> using codeset gbk territory CN collate using identity
3.连接上数据库:
db2 "connect to <dbname>"
4.创建缓冲池 + 建立表空间;
1).删除旧的表空间:
db2 drop tablespace tablespace1, tablespace2, tablespace3
2).新建缓冲池:
db2 create bufferpool bp32k all nodes size -1 pagesize 32k
bp32k为该缓冲池的名称;
32K为页大小;
size=-1表示使用缺省的buffpage,而buffpage可以通过db2 get db cfg|grep -i buff参数查看到;
3).新建表空间:
db2 "create