jdgue 发表于 2016-11-13 09:15:54

db2 数据库分区脚本

db2start dbpartitionnum 1 ADD DBPARTITIONNUM HOSTNAME WWW-60A14975EDB PORT 1 COMPUTER WWW-60A14975EDB USER db2admin PASSWORD db2adminNETNAME WWW-60A14975EDB WITHOUT TABLESPACES


CREATE DATABASE PARTITION GROUP USERGROUP ON DBPARTITIONNUMS(0,1) ;

CREATE TABLESPACE TS IN USERGROUP MANAGED BY DATABASE USING (file 'E:\DB2_01\TScontainer $N' 10000)




CREATE TABLE DPFTABLE (ID INTEGER NOT NULL, NAME CHAR(20) NOT NULL) IN TS PARTITIONING KEY (ID) USING HASHING


CREATETABLESPACE "TS"
IN DATABASE PARTITION GROUP "IBMDEFAULTGROUP"
PAGESIZE 4K
MANAGED BY SYSTEM
USING
   ('D:\DB2\TScontainer1',
    'D:\DB2\TScontainer2'
   )
   ON DBPARTITIONNUM (0)
USING
   ('D:\DB2\TScontainer3',
    'D:\DB2\TScontainer4'
   )
   ON DBPARTITIONNUM (1)
EXTENTSIZE 32
PREFETCHSIZE 16
BUFFERPOOL "IBMDEFAULTBP"
OVERHEAD 24.10
TRANSFERRATE 0.90
DROPPED TABLE RECOVERY OFF;
页: [1]
查看完整版本: db2 数据库分区脚本