db2查看数据库信息和创建tablespace

(1)查看db2 version:
db2 connect to GEHGAL user db2admin using password
db2level

(2)创建16k, 32k, 64k pagesize
db2 create bufferpool ibmdefault16k IMMEDIATE SIZE 5000 PAGESIZE 16k
or
create bufferpool ibmdefault32k IMMEDIATE SIZE 5000 PAGESIZE 32k
在Windows上创建pagesize 64k bufferpool在DB2 V8和V9.7中不行
create bufferpool ibmdefault64k IMMEDIATE SIZE 5000 PAGESIZE 64k

(3)创建tablespace
db2 CREATE TABLESPACE gehgal16 IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 16K MANAGED BY system using ('C:\DB2\NODE0000\SQL00001\gehgal16') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT16K

db2 CREATE TABLESPACE gehgal32 IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 32K MANAGED BY system using ('C:\DB2\NODE0000\SQL00001\gehgal32') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT32K

CREATE TEMPORARY TABLESPACE gehgalsystemtmp16 IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 16K MANAGED BY SYSTEM USING ('C:\DB2\NODE0000\SQL00001\gehgalsystemtmp16') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT16K

CREATE TEMPORARY TABLESPACE gehgalsystemtmp32 IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 32K MANAGED BY SYSTEM USING ('C:\DB2\NODE0000\SQL00001\gehgalsystemtmp32') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT32K

在Windows下查看DB2端口号:
DB2的端口号映射关系一般放在: c:\windows\system32\drivers\etc\services目录下

你可能感兴趣的:(C++,c,windows,db2,C#)