Oracle 11g RAC 监听器使用详解

最近部署一个两节点Oracle RAC 环境,刚刚开始没怎么留意,但当在使用的时候竟然scan-ip无法通过客户端登陆使用,但是在两个节点上可正常使用,此外vip无论在节点上还是其他客户端使用完全ok

在安装GI的时候最后报错,但经查看官方文档说是可能scan-ip写到hosts文件中了,但本人环境中三个scan-ip均为加入到hosts文件中,故此直接忽略掉该报错。

下面是本人详细的排错过程:

1.          任意节点上使用tnsnames.ORA透过scan-ip登陆数据库:

[grid@RAC01 admin]$ tnsping RACDB

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-JAN-2014 18:41:16

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:

/u/app/11.2.0/grid/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.134.30.50)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = RACDB)))

OK (0 msec)

[grid@RAC01 admin]$ sqlplus scott/testpassword@RACDB

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 2 18:41:27 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

SQL>

2.          检查RAC上的scan-ip配置:

[grid@RAC01 ~]$ srvctl config scan

SCAN name: RACSCAN.localdomain., Network: 1/10.134.30.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /RACSCAN.localdomain/10.134.30.50

SCAN VIP name: scan2, IP: /RACSCAN.localdomain/10.134.30.51

SCAN VIP name: scan3, IP: /RACSCAN.localdomain/10.134.30.52

[grid@RAC01 ~]$ srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521

SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521

3.          DNS测试:

[root@RAC01 ~]# nslookup RACSCAN.localdomain.

Server:        10.134.30.27

Address:        10.134.30.27#53

Name:  RACSCAN.localdomain

Address: 10.134.30.52

Name:  RACSCAN.localdomain

Address: 10.134.30.50

Name:  RACSCAN.localdomain

Address: 10.134.30.51

[grid@RAC01 ~]$ nslookup 10.134.30.50

Server:        10.134.30.27

Address:       10.134.30.27#53

50.30.134.10.in-addr.arpa      name = RACSCAN.localdomain.

[grid@RAC01 ~]$ nslookup 10.134.30.51

Server:        10.134.30.27

Address:        10.134.30.27#53

51.30.134.10.in-addr.arpa      name = RACSCAN.localdomain.

[grid@RAC01 ~]$ nslookup 10.134.30.52

Server:        10.134.30.27

Address:        10.134.30.27#53

52.30.134.10.in-addr.arpa      name = RACSCAN.localdomain.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/dffb5a3ac0d8afa8fb3b4111ac430aa8.html