兰州信息网
科技
当前位置:首页 > 科技

DB2 创建数据库缓冲池和表空间

发布时间:2019-09-13 19:47:18 编辑:笔名

1、创建数据库

1CREATEDATABASEfrk 2AUTOMATIC STORAGE NO ON

3'C:\\'USING CODESET UTF-8TERRITORY CN COLLATE 4USING SYSTEM PAGESIZE 32768

5CATALOG TABLESPACE MANAGED BYDATABASE

6USING ( FILE'E:\\db2 data\\frksysdectablespace'51200) 7USERTABLESPACE MANAGED BYDATABASE

8USING ( FILE'E:\\db2 data\\frksysusertablespace'51200) 9TEMPORARYTABLESPACE MANAGED BYDATABASE

10USING ( FILE'E:\\db2 data\\frksystemptablespace'51200) ;

2、创建缓冲池

1CONNECT TOFRK; 2CREATEBUFFERPOOL BUFFER1 IMMEDIATE SIZE 250PAGESIZE 32K ;3CREATEBUFFERPOOL BUFFER2 IMMEDIATE SIZE 250PAGESIZE 32K ;4CREATEBUFFERPOOL BUFFER3 IMMEDIATE SIZE 250PAGESIZE 32K ;5CREATEBUFFERPOOL BUFFER4 IMMEDIATE SIZE 250PAGESIZE 32K ;6CONNECT RESET;

3、创建表空间

1CONNECT TOFRK; 2CREATE REGULAR TABLESPACE FRKREGTABLESPACE PAGESIZE 32K MANAGED BYDATABASE USING ( FILE'E:\\db2 data\\frkregtablespacedata'16000) EXTENTSIZE 16OVERHEAD 10.5PREFETCHSIZE 16TRANSFERRATE 0.14BUFFERPOOL BUFFER1 DROPPED TABLERECOVERY ON

3CREATE SYSTEM TEMPORARY TABLESPACE FRKSYSTEMPTSPACE PAGESIZE 32K MANAGED BYDATABASE USING ( FILE'E:\\db2 data\\frmsystemtablespacedata'6400) EXTENTSIZE 16OVERHEAD 10.5PREFETCHSIZE 16TRANSFERRATE 0.14BUFFERPOOL BUFFER2 ;4CREATE USERTEMPORARY TABLESPACE FRKUSERTEMPTSPACE PAGESIZE 32K MANAGED BYDATABASE USING ( FILE'E:\\db2 data\\frkusertemptablespacedata'6400) EXTENTSIZE 16OVERHEAD 10.5PREFETCHSIZE 16TRANSFERRATE 0.14BUFFERPOOL BUFFER3 ;5CREATE LARGE TABLESPACE FRKLAGGERTSPACE PAGESIZE 32K MANAGED BYDATABASE USING ( FILE'E:\\db2 data\\frkloggertablespacedata'16000) EXTENTSIZE 16OVERHEAD 10.5PREFETCHSIZE 16TRANSFERRATE 0.14BUFFERPOOL BUFFER4 ;6CONNECT RESET; 7

4、创建表

1CREATETABLEabc( 2 id integerNOTNULL, 3 name VARCHAR(180)) 4IN

小孩脸色发黄吃什么
小孩化痰止咳吃什么药最好
治疗心肌梗死的方法
男性尿后放射性痛症状