db 2インストール

1399 ワード

tar zxvf db2exc_972_LNX_x86_64.tar.gz

./db2_install     #    -b              

groupadd -g 600 db2iadm1

groupadd -g 601 db2fadm1

useradd -g db2iadm1 -u 600 -m -d /home/db2inst1 db2inst1

useradd -g db2fadm1 -u 601 -m -d /home/db2fenc1 db2fenc1

db2ls   #         

cd /opt/ibm/db2/V9.7/instance/

./db2icrt -p 53010 -u db2fenc1 db2inst1   #     

su - db2inst1

db2start

netstat -an | grep 53010      #        

ps -ef | grep db2             #      

db2ilist                      #      

db2 get dbm cfg

mkdir /home/db2inst1/dbauto -p

mkdir /home/db2inst1/db -p

db2 "create database mydb1 automatic storage yes on /home/db2inst1/dbauto dbpath on /home/db2inst1/db using codeset UTF-8 Territory CN collate using system"

db2 connect to mydb1

db2 get db cfg for mydb1