Chinaunix首页 | 论坛 | 博客
  • 博客访问: 455083
  • 博文数量: 97
  • 博客积分: 3396
  • 博客等级: 中校
  • 技术积分: 996
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-25 13:14
文章分类

全部博文(97)

文章存档

2014年(1)

2013年(2)

2012年(7)

2011年(13)

2010年(18)

2009年(7)

2007年(10)

2006年(39)

分类:

2006-04-05 19:24:20

 
建立另一个实例
这个命令只能以ROOT执行(/usr/opt/db2_08_01/instance/)
./db2icrt -u db2fenc1 db2fenc1,一个用户只能建一个实例
The db2icrt Command in Detail

1.Creates the database manager instance
2. Sets the environment variables DB2INSTANCE and PATH
3.Creates the /sqllib subdirectory in the $HOME directory of the
SYSADM
4.Creates the DAS, if it is a new Windows installation
5. Configures communications based on the server's available
protocols
6. Creates the db2profile and userprofile files
 
SMS是建在DIR(TYPE:PATH)上,不用指定PAGE数,初始分配为一个PAGE
SAMPLE:db2 => create tablespace testsms managed by system using ('/db2/db2sms')
 
DMS建在裸设备或文件(TYPE:DISKFILE)上,可以用页数、KB、MB 或 GB 指定容器的大小。SAMPLE:db2 => create tablespace testdms managed by database using (file '/db2/db2dms/dms' 1000)
              create tablespace dms_ts1 managed by database using (DEVICE '/dev/rdb2lv' 32000)

用CREATE DB DBNAME,建立默认SMS TABLESPACES
 
db2 => alter tablespace testdms add (file '/db2/db2dms/file' 2000)
       alter tablespace testdms add (device '/dev/rdb2dms1' 8000)
也可以用RESIZE
db2 => alter tablespace testdms resize (file '/db2/db2dms/dms' 3000,device '/dev/rdb2dms1' 8001)
 
也可以用EXTEND
db2=>alter tablespace testdms extend(fi
le '/db2/db2dms/dms' 1000,device '/dev/rdb2dms1' 1000

该命令的运行结果为在原有容量的基础之上,每个容器再增加1000页。

阅读(1025) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~