周五下载后,自己测了一下先
[@more@]1)如何启动 HADR 可读备机?
First, you need to set DB2_HADR_ROS=ON on standby.
db2set DB2_HADR_ROS=ON
Then, start standby as usual:
db2 start hadr on db sample as standby
DB20000I START HADR ON DATABASE 命令成功完成。
db2 connect to sample
......
db2 "select * from staff"
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
SQL1773N 启用了读操作的 HADR
备用数据库不支持此语句或命令所需的功能。原因码:"1"。
2) 如何设置 ISOLATION level
a. set ISOLATION level at statement level
db2 "select * from staff with ur"
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
10 Sanders 20 Mgr 7 98357.50 -
......
b. set default ISOLATION level to UR:
db2set DB2_STANDBY_ISO=UR
need to recycle instance
db2 "select * from staff"
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
10 Sanders 20 Mgr 7 98357.50 -
......
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8481986/viewspace-1029196/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8481986/viewspace-1029196/