首先要建立用户:
groupadd db2iadm1 -g 10000
groupadd db2fadm1 -g 1001
groupadd dasadm1 -g 1002
useradd -u 600 -G db2iadm1 db2inst1 #db2inst1是db2的实例用户
useradd -u 601 -G db2iadm1 dasuser1 #dasuser1 是db2的管理用户
useradd -u 602 -G db2iadm1 db2fenc1 #db2fenc1是db2保护用户,保护存储过程的
passwd db2inst1
passwd dasuser1
passwd db2fenc1
usermod -G db2fadm1 db2fenc1
usermod -G dasadm1 db2fenc1
./db2icrt db2inst1
./db2icrt -u db2fenc1 db2inst1
./dascrt -u dasuser1
su - db2inst1
db2ilist
db2
vi .bash_profile
加入
source /home/db2inst1/sqllib/db2profile
db2 list db directory
db2 list node
db2 list node directory
db2 list db directory
db2 catalog tcpip node DBname remote IP server PORT #编目远程数据库节点到本地
db2 catalog db DBname at node DBname
db2 connect to DBname user db2inst1 using PASSWORD
db2 list db directory
db2 list node directory
db2 uncatalog node masdb
db2 uncatalog db masdb
阅读(1456) | 评论(0) | 转发(0) |