future2012lg

博客园 首页 新随笔 联系 订阅 管理

今天登录PL/SQL出现问题:

---------------------------
sys@RAC1 as SYSDBA
---------------------------
ORA-12521: TNS: 监听程序当前无法识别连接描述符中请求的实例

---------------------------

但是TNSPING RAC1可以通的。

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.203)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
(INSTANCE_NAME = racdb1)
)
)

查看rac1监听配置:

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.223)(PORT = 1521)(IP = FIRST))
)
)

 

SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/ora10g/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

没什么错误,

 

后来发现在配置etc/hosts的时候有点问题:

127.0.0.1 rac1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.223 rac1
192.168.1.224 rac2
192.168.1.203 rac1-vip
192.168.1.204 rac2-vip
10.0.0.223 rac1-priv
10.0.0.224 rac2-priv
[root@rac1 etc]# ping rac1
PING rac1 (127.0.0.1) 56(84) bytes of data.
64 bytes from rac1 (127.0.0.1): icmp_seq=1 ttl=64 time=0.438 ms
64 bytes from rac1 (127.0.0.1): icmp_seq=2 ttl=64 time=0.103 ms

--- rac1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.103/0.270/0.438/0.168 ms

修改为:

# that require network functionality will fail.
127.0.0.1 localhost
192.168.1.223 rac1
192.168.1.224 rac2
192.168.1.203 rac1-vip
192.168.1.204 rac2-vip
10.0.0.223 rac1-priv
10.0.0.224 rac2-priv

[root@rac1 etc]# ping rac1
PING rac1 (192.168.1.223) 56(84) bytes of data.
64 bytes from rac1 (192.168.1.223): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from rac1 (192.168.1.223): icmp_seq=2 ttl=64 time=0.063 ms

然后在把监听重启一下,等待片刻之后。

PL/SQL可以登录了

 

posted on 2014-05-15 20:56  future2012lg  阅读(7023)  评论(0编辑  收藏  举报