11gr2 RAC中客户端利用scan-ip连接server,之前都是利用vip 连接数据库,现在客户端只需要知道scan-ip即可连接,scan-ip的作用使得节点的个数对客户端是透明的
Scan-ip----àsan-listener-àlocal listener
配置
Tns 配置
MDSTEST2=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=rac-scan)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=mdstest)
)
)
Rac-scan的ip记录在/etc/hosts或客户端的hosts中
连接的时候出现错误
ORA-12545:Connect failed because target host or object does not exist
解决方法
SQL> show parameter listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
listener_networks string
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=tyan
148-vip)(PORT=1521))))
remote_listener string rac-scan:1521
SQL>alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.47)(PORT=1521))))' scope=both sid='mdstest2';
System altered.
在两节点上处理,其中host为节点的vip 地址,sid为当前节点的实例名
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24849178/viewspace-740226/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24849178/viewspace-740226/