1-vip)(PORT=1521))))
SQL> show parameter remote_lis
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string RACSCAN.localdomain.:1521
SQL>
注意上述中的local_listener参数的配置,发现时指向vip的;
8. 修改该参数指向scan-ip。
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RACSCAN.localdomain.)(PORT=1521))))';
System altered.
9. 客户端再次测试:
primary$tnsping guijian
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-JAN-2014 19:39:25
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u/app/oracle/product/11g/db/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = RACSCAN.localdomain.)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RACDB)))
OK (10 msec)
primary$
primary$sqlplus scott/testpassword@guijian
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 2 19:40:26 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SCOTT@guijian>
此时可以看到顺利登陆。此外该参数修改为scan-ip后,在此再客户端尝试着使用vip登陆时开始报错:
primary$sqlplus scott/Testpassword@guijian
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 2 19:42:54 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Enter user-name:
primary$
上述情况说明了一个重要的问题:local_listener参数的设置关系到今后客户端是使用什么类型的ip地址进行登陆数据库。