RAC的客户端tnsnames.ora配置
RAC的client端tnsnames.ora配置什么情况下可以用IP,什么情况下需要用一个name,然后在hosts文件中注明name与ip的关系?
例如:
test1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.2)(PORT = 1521))
(LOAD_BALANCE = no)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = basic)
(RETRIES = 180)
(DELAY = 5)
)
)
)
test2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.2)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac_vip1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac_vip2)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = test)
(failover_mode =
(type = select)
(method = basic)
(retries = 180)
(delay = 5)
)
)
)
test3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac_vip1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac_vip2)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = test)
(failover_mode =
(type = select)
(method = basic)
(retries = 180)
(delay = 5)
)
)
)
hosts文件中:
rac_vip1 1.1.1.1
rac_vip2 1.1.1.2
以上三种的适应场景是什么呢?谢谢!
另外,
test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
&n