db2 v10.1在AIX雙機上的配置

fjzcau發表於2015-02-27
20141113
1104&人行報表 

--group
db2iadm1 300
db2fadm1 301
--user
db2srp 300
db2fenc1 301

cd /opt/IBM/db2/V10.1_fp4/instance
./db2icrt -a server_encrypt -u db2fenc1 db2srp

db2 "create database srpdb on /data1,/data2,/data3 dbpath on /home/db2srp"

--2GB
db2 "create bufferpool srpdb_bp8k1 size 262144 automatic pagesize 8k"
--2GB
db2 "create bufferpool srpdb_bp16k1 size 131072 automatic pagesize 16k"
--2GB
db2 "create bufferpool srpdb_bp16k2 size 131072 automatic pagesize 16k"

db2 "create tablespace srpdb_8k_tbs1  pagesize 8k  bufferpool srpdb_bp8k1"
db2 "create tablespace srpdb_16k_tbs1 pagesize 16k bufferpool srpdb_bp16k1"

db2set DB2COMM=tcpip
db2 update dbm cfg using SVCENAME 60000


--備機start.sh  主機為 db2nodes.cfg.db1
banner "start"|wall
cp /home/db2srp/sqllib/db2nodes.cfg.db2 /home/db2srp/sqllib/db2nodes.cfg
su - db2srp -c "db2start"
su - db2srp -c "db2 activate db srpdb"
banner "start ok"|wall
exit 0

--stop.sh
banner "stop"|wall
su - db2srp -c "db2stop force"
banner "stop ok"|wall
exit 0

--db2nodes.cfg
# cat /home/db2srp/sqllib/db2nodes.cfg.db1
0 srptdb01 0
# cat /home/db2srp/sqllib/db2nodes.cfg.db2
0 srptdb02 0


--HA備機修改檔案:/etc/services
DB2_db2srp      60000/tcp
DB2_db2srp_1    60001/tcp
DB2_db2srp_2    60002/tcp
DB2_db2srp_END  60003/tcp

--/etc/hosts
#########################
10.242.0.210    srptdb_srv
10.242.0.211    sprtdb01_pers srptdb01
10.242.0.212    sprtdb02_pers srptdb02
192.255.254.7   sprtdb01_boot1
192.255.255.7   sprtdb01_boot2
########################
192.255.255.8   sprtdb02_boot2 
192.255.254.8   sprtdb02_boot1  

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22661144/viewspace-1442519/,如需轉載,請註明出處,否則將追究法律責任。

相關文章