在不同環境下DB2創建表空間有不同的方法,下面為您介紹的是在aix環境下DB2創建表空間的方法,希望可以使您對DB2創建表空間方面有更多的認識。
- db2set db2codepage=819
- db2 create database easytest on /home/db2inst1
- db2 connect to test04 user db2inst1 using db2
- db2 CREATE Bufferpool USER8 SIZE 100000 PAGESIZE 8K
- db2 CREATE Bufferpool USER16 SIZE 1000 PAGESIZE 16 K
- db2 CREATE Bufferpool USER32 SIZE 1000 PAGESIZE 32 K
- db2stop force
- db2start
- db2 connect to test04 user db2inst1 using db2
- db2 "CREATE REGULAR TABLESPACE TS_USER8 PAGESIZE 8K MANAGED BY SYSTEM USING ('FSMS_8K_1') BUFFERPOOL USER8"
- db2 "CREATE REGULAR TABLESPACE TS_USER16 PAGESIZE 16K MANAGED BY SYSTEM USING ('FSMS_16K_1') BUFFERPOOL USER16"
- db2 "CREATE REGULAR TABLESPACE TS_USER32 PAGESIZE 32K MANAGED BY SYSTEM USING ('FSMS_32K_1') BUFFERPOOL USER32"
- db2 CREATE Bufferpool TMPBUF8 SIZE 10000 PAGESIZE 8K
- db2 "CREATE TEMPORARY TABLESPACE TempTS_USER8 PAGESIZE 8K MANAGED BY SYSTEM USING ('/home/db2inst1/db2inst1/TEMPNODE0004' ) EXTENTSIZE 16 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL "TMPBUF8" DROPPED TABLE RECOVERY OFF"
- db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,LOAD ON DATABASE TO USER EASYMIS
- db2 GRANT USE OF TABLESPACE TS_USER8 TO easymis
- db2 GRANT USE OF TABLESPACE TS_USER16 TO easymis
- db2 GRANT USE OF TABLESPACE TS_USER32 TO easymis
- db2 connect to test04 user easymis using easymis
- db2 -f dbstruct.sql >kk.log
以上就是aix下DB2創建表空間的方法步驟。
windows下DB2創建表空間的實現
教您如何在DB2刪除數據量大的表
DB2索引設計准則
可視化 DB2 空間數據
DB2數據庫性能理解的二十大誤區