日期:2014-05-16 浏览次数:20482 次
db2sampl
db2 get db cfg for sample | grep -i log mkdir -p sample/redo mkdir -p sample/archive db2 update db cfg for sample using NEWLOGPATH /home/db2inst2/sample/redo db2 update db cfg for sample using LOGARCHMETH1 /home/db2inst2/sample/archive db2stop db2start db2 backup db sample online to "/nfs_backup/db2_fulbak/" with 3 buffers buffer 2000 parallelism 2 include logs
db2 list db directory db2 restore db sample from "/nfs_backup/db2_fulbak/" db2 rollforward db sample to end of logs
db2 update db cfg for sample using HADR_LOCAL_HOST 96.0.43.61 db2 update db cfg for sample using HADR_LOCAL_SVC 70002 db2 update db cfg for sample using HADR_REMOTE_HOST 96.0.43.62 db2 update db cfg for sample using HADR_REMOTE_SVC 70012 db2 update db cfg for sample using HADR_REMOTE_INST db2inst2 db2 update db cfg for sample using HADR_SYNCMODE SYNC db2 update db cfg for sample using HADR_TIMEOUT 3 db2 update db cfg for sample using HADR_PEER_WINDOW 120 db2 connect to sample db2 quiesce database immediate force connections db2 unquiesce database db2 connect reset
db2 update db cfg for sample using HADR_LOCAL_HOST 96.0.43.62 db2 update db cfg for sample using HADR_LOCAL_SVC 70012 db2 update db cfg for sample using HADR_REMOTE_HOST 96.0.43.61 db2 update db cfg for sample using HADR_REMOTE_SVC 70002 db2 update db cfg for sample using HADR_REMOTE_INST db2inst2 db2 update db cfg for sample using HADR_SYNCMODE SYNC db2 update db cfg for sample using HADR_TIMEOUT 3 db2 update db cfg for sample using HADR_PEER_WINDOW 120
db2 deactivate db sample db2 start hadr on db sample as standby
db2 deactivate db sample db2 start hadr on db sample as primary
db2 get db cfg for sample | grep -i hadr db2pd -d sample -hadr
db2 takeover hadr on db sample db2 takeover hadr on db sample by force
db2 deactivate db sample db2 stop hadr on db sample
db2 deactivate db sample db2 stop hadr on db sample