查询主备状态:
db2pd -d testdb -hadr


查看目前hadr正常启动状态
备库执行sql报错:

db2 "insert into tab1 values (1)"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1773N The statement or command failed because it requires functionality
that is not supported on a read-enabled HADR standby database. Reason code =
"5".
原因是备库存在写保护
切换主备在原备库做插入数据操作
db2 takeover ha
DB2 HADR 主备切换实战

最低0.47元/天 解锁文章
372

被折叠的 条评论
为什么被折叠?



