建立另一个实例
这个命令只能以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(file '/db2/db2dms/dms' 1000,device '/dev/rdb2dms1' 1000
该命令的运行结果为在原有容量的基础之上,每个容器再增加1000页。
阅读(1057) | 评论(0) | 转发(0) |