1.创建新实例
[root@xifenfei ~]# cd /opt/db2/V9.5/instance/ [root@xifenfei instance]# ./db2icrt -h DBI1001I Usage: db2icrt [-h|-?] [-d] [-a AuthType] [-p PortName] [-s InstType] -u FencedID InstName [root@xifenfei instance]# useradd Fence2 [root@xifenfei instance]# passwd Fence2 Changing password for user Fence2. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@xifenfei instance]# useradd db2inst2 [root@xifenfei instance]# passwd db2inst2 Changing password for user db2inst2. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@xifenfei instance]# ./db2icrt -a server -p 55555 -s ese -u Fence2 db2inst2 DBI1070I Program db2icrt completed successfully. [root@xifenfei instance]# su - db2inst2 [db2inst2@xifenfei ~]$ db2 get instance The current database manager instance is: db2inst2 [db2inst2@xifenfei ~]$ db2ilist db2inst1 db2inst2 [db2inst2@xifenfei ~]$ db2greg -dump S,DB2,9.5.0.0,/opt/db2/V9.5,,,0,0,,1332659153,0 S,DAS,9.5.0.0,/opt/db2/V9.5/das,lib/libdb2dasgcf.so,,,, ,, I,DAS,9.5.0.0,dasusr1,/home/dasusr1/das,,1,,/opt/db2/V9.5/das,, I,DB2,9.5.0.0,db2inst1,/home/db2inst1/sqllib,,1,0,/opt/db2/V9.5,, I,DB2,9.5.0.0,db2inst2,/home/db2inst2/sqllib,,1,0,/opt/db2/V9.5,,
2.启动关闭实例
[db2inst2@xifenfei ~]$ db2stop 03/31/2012 11:57:48 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. [db2inst2@xifenfei ~]$ db2start 03/31/2012 11:57:52 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful.
3.删除实例
--先需要关闭实例 [root@xifenfei instance]# ./db2idrop db2inst2 DBI1070I Program db2idrop completed successfully.
《DB2实例管理》有 1 条评论