数据库负载均衡执行方案
数据库负载均衡执行方案
部分内容如下:
(1)修改/oracle/product/10.2/db_1/network/admin/tnsnames.ora,增加以下内容
LISTENERS_ZZDBC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 101.24.15.113)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 101.24.15.114)(PORT = 1521))
)
注:两台机器都要改
(2)修改数据库参数
1.修改LOCAL_LISTENER参数
ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 101.24.15.113)(PORT = 1521))' SID = 'zzdbc1';
ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 101.24.15.114)(PORT = 1521))' SID = 'zzdbc2';
2.修改remote_listener参数
alter system set remote_listener = 'LISTENERS_ZZDBC' scope=both sid='*';
3.在不同节点进行监听动态注册
alter system register;