两个节点的RAC,内容有点长,但是基本上是描述的信息,请耐心看一下,谢谢。
IP配置分别为:
#public ip
192.168.100.103 node1
192.168.100.104 node2
#vip ip
192.168.100.203 node1-vip
192.168.100.204 node2-vip
#private ip
10.10.17.223 node1-priv
10.10.17.224 node2-priv
192.168.100.105 racscan
现在node1上的监听情况是:
[oracle@node1 admin]$ ps -ef|grep tns
grid 5119 1 0 14:03 ? 00:00:00 /oracle/app/grid/product/11.2.0/bin/tnslsnr LISTENER_SCAN1 -inherit
grid 22673 1 0 19:04 ? 00:00:00 /oracle/app/grid/product/11.2.0/bin/tnslsnr LISTENER -inherit
[oracle@node1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-NOV-2012 19:12:59
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 03-NOV-2012 19:04:11
Uptime 0 days 0 hr. 8 min. 48 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/grid/product/11.2.0/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/node1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.103)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.203)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
Instance "orcl11", status READY, has 2 handler(s) for this service...
Instance "orcl12", status READY, has 1 handler(s) for this service...
Service "orcl1XDB" has 2 instance(s).
Instance "orcl11", status READY, has 1 handler(s) for this service...
Instance "orcl12", status READY, has 1 handler(s) for this service...
The command completed successfully
节点2上:
[oracle@node2 admin]$ ps -ef|grep tns
grid 18895 1 0 17:54 ? 00:00:00 /oracle/app/grid/product/11.2.0/bin/tnslsnr LISTENER -inherit
[oracle@node2 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-NOV-2012 18:04:46
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 03-NOV-2012 17:54:54
Uptime 0 days 0 hr. 9 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/grid/product/11.2.0/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/node2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.104)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.204)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
Instance "orcl11", status READY, has 1 handler(s) for this service...
Instance "orcl12", status READY, has 2 handler(s) for this service...
Service "orcl1XDB" has 2 instance(s).
Instance "orcl11", status READY, has 1 handler(s) for this service...
Instance "orcl12", status READY, has 1 handler(s) for this service...
The command completed successfully
DNS配置后信息为:
[oracle@node1 admin]$ nslookup racscan
Server: 192.168.100.103
Address: 192.168.100.103#53
Name: racscan.localdomain
Address: 192.168.100.105
tnsnames.ora内容为:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = racscan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
现在我用tns连接数据库时都报错:
[oracle@node1 admin]$ sqlplus XXX/oracle@ORCL
SQL*Plus: Release 11.2.0.1.0 Production on Sat Nov 3 19:16:32 2012
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:
但是接下来如果输入username和password,又是能登进去的,请问一下大侠们,这个问题是出在哪里?困了我N久,非常感谢。