安裝了兩臺suse11 sp4的機器,安裝hana數據庫,需要SID和系統編號一致,hostname需不一樣。
配置過程:
在hana1上做如下:
su - hdbadm
./hdbnsutil -sr_enable --name=hana1 開啓複製模式
./hdbnsutil -sr_state 查看複製狀態在hana2上做如下:
su - hdbadm
/usr/sap/hostctrl/exe/sapcontrol -nr 00 -function StopSystem HDB 關閉hana2的hana數據庫
hdbnsutil -sr_register --name=hana2 --remoteHost=hana1 --remoteInstance=HDB --replicationMode=async --operationMode=logreplay 進行復制配置
./hdbnsutil -sr_state 查看複製狀態
/usr/sap/hostctrl/exe/sapcontrol -nr 00 -function StartSystem HDB 啓動hana2的hana2數據庫。
3.小結
hana system replication優點:
在於在應用層實現容災,可以考慮在容災中應用,並且根據hana數據庫需要pci-e flash卡的特點,不太適合做存儲級別存儲層的容災複製。實現較爲靈活。
hana system replication缺點:
數據同步受限於IP網絡的速度,second system啓用時,hana數據庫IP要改變,需要配合DNS做解析的改變。