Oracle Rac监听之困惑

今天在客户碰到一问题,在这里记录一下:
/etc/hosts文件配置为
[quote]127.0.0.1 localhost loopback # loopback (lo0) name/address

#public network
192.200.31.3 hisdb01
192.200.31.4 hisdb02

#virtual ip address
192.200.31.19 hisdb01_vip
192.200.31.20 hisdb02_vip

#private network used for rac
10.0.0.1 hisdb01_priv
10.0.0.2 hisdb02_priv[/quote]

listener.ora文件配置为

[quote]LISTENER_HISDB02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hisdb02_vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.200.31.4)(PORT = 1521)(IP = FIRST))
)
)

SID_LIST_LISTENER_HISDB02 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/products/rdbms)
(PROGRAM = extproc)
)
)

SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_HISDB02=OFF
INBOUND_CONNECT_TIMEOUT_ =0
PREFER_LEAST_LOADED_NODE_LISTENER_LISTENER_HISDB02=OFF[/quote]

主机上监听状态显示
[quote]oracle.orcl2@hisdb02:/home/oracle$lsnrctl status listener

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 05-FEB-
2010 10:58:49

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1
.0 - Production
Start Date 03-FEB-2010 16:00:32
Uptime 1 days 18 hr. 58 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/products/rdbms/network/admin/listener.ora
Listener Log File /oracle/products/rdbms/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hisdb02)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Instance "orcl2", status READY, has 2 handler(s) for this service...
Service "orclXDB" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Instance "orcl2", status READY, has 2 handler(s) for this service...
Service "standby" has 2 instance(s).
Instance "standby1", status READY, has 1 handler(s) for this service...
Instance "standby2", status READY, has 2 handler(s) for this service...
Service "standby_XPT" has 2 instance(s).
Instance "standby1", status READY, has 1 handler(s) for this service...
Instance "standby2", status READY, has 2 handler(s) for this service...
The command completed successfully

[/quote]

[quote]oracle.orcl2@hisdb02:/oracle/products/rdbms/network/admin$lsnrctl service

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 05-FEB-
2010 11:02:54

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "orcl" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2147 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb01)(PORT=1521))
Instance "orcl2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:29731 refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb02)(PORT=1521))
Service "orclXDB" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: hisdb01, pid: 1232986>
(ADDRESS=(PROTOCOL=tcp)(HOST=hisdb01)(PORT=32808))
Instance "orcl2", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: hisdb02, pid: 1232986>
(ADDRESS=(PROTOCOL=tcp)(HOST=hisdb02)(PORT=32856))
Service "orcl_XPT" has 2 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2147 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb01)(PORT=1521))
Instance "orcl2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:29731 refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb02)(PORT=1521))
Service "standby" has 2 instance(s).
Instance "standby1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb01)(PORT=1521))
Instance "standby2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb02)(PORT=1521))
Service "standby_XPT" has 2 instance(s).
Instance "standby1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb01)(PORT=1521))
Instance "standby2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=hisdb02)(PORT=1521))
The command completed successfully[/quote]

监听进程显示为
[quote]oracle.orcl2@hisdb02:/home/oracle$ps -ef|grep tns
oracle 1040544 1 0 Feb 03 - 3:52 /oracle/products/rdbms/bin/tnslsnr LISTENER -inherit
oracle 3342398 3113092 0 10:58:35 pts/0 0:00 grep tns[/quote]

rac状态显示为
[quote]oracle.orcl2@hisdb02:/home/oracle$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE hisdb01
ora....01.lsnr application ONLINE ONLINE hisdb01
ora....b01.gsd application ONLINE ONLINE hisdb01
ora....b01.ons application ONLINE ONLINE hisdb01
ora....b01.vip application ONLINE ONLINE hisdb01
ora....SM2.asm application ONLINE ONLINE hisdb02
ora....02.lsnr application ONLINE ONLINE hisdb02
ora....b02.gsd application ONLINE ONLINE hisdb02
ora....b02.ons application ONLINE ONLINE hisdb02
ora....b02.vip application ONLINE ONLINE hisdb02
ora.orcl.db application ONLINE ONLINE hisdb01
ora....orcl.cs application ONLINE ONLINE hisdb01
ora....cl1.srv application ONLINE ONLINE hisdb01
ora....cl2.srv application ONLINE ONLINE hisdb02
ora....l1.inst application ONLINE ONLINE hisdb01
ora....l2.inst application ONLINE ONLINE hisdb02[/quote]

本地客户端tnsnames.ora配置为
[quote]RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.200.31.20)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl2)
)
)[/quote]

奇怪的事情发生了,tnsping居然能通,为什么呢?
[quote]C:\Documents and Settings\Administrator>tnsping rac2

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 05-2月 -
2010 10:56:42

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

已使用的参数文件:
D:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora


已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.200.
31.20)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl2)))
OK (10 毫秒)[/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值