linux db2创建表空间,db2创建表空间运行执行计划表步骤

查看表空间位置

db2  connect to  sample----连数据库

db2 list  tablespaces

Database Connection Information

Database server        = DB2/LINUXX8664 10.5.5

SQL authorization ID   = DB2INST1

Local database alias   = SAMPLE

[db2inst1@107-sqlcheck ~]$ db2 list  tablespaces

Tablespaces for Current Database

Tablespace ID                        = 0

Name                                 = SYSCATSPACE

Type                                 = Database managed space

Contents                             = All permanent data. Regular table space.

State                                = 0x0000

Detailed explanation:

Normal

list tablespace containers for tablespaceID(表空间id号) show detail

list tablespace containers for 0 show detail

[db2inst1@107-sqlcheck ~]$ db2  list tablespace containers for 0 show detail

Tablespace Containers for Tablespace 0

Container ID                         = 0

Name                                 = /home/db2inst1/db2inst1/NODE0000/SAMPLE/T0000000/C0000000.CAT

Type                                 = File

Total pages                          = 20480

Useable pages                        = 20476

Accessible                           = Yes

创建buffer pool

db2 create BUFFERPOOL bigbuffer SIZE 4000 PAGESIZE 32K(可取数4k,8K,16K)

创建表空间

db2 "create tablespace newtbs04 pagesize 32k managed by system using ('/home/db2inst1/db2inst1/NODE0000/SAMPLE/T0000001/test.TMP') BUFFERPOOL bigbuffer  "

newtbs04----代表表空间名

pagesize 32k 32可以指定为8k  16k  32k

bigbuffer---代表表空间名

授权

db2 grant use of tablespace newtbs04  to user db2dpmon

修改表EXPLAIN.DDL文件

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值