最近在使用以前服务器的listner的时候,出现“不能识别当前的链接”,找了很多资料很少无奈,后来静下来想了一下客户端坚挺不到Oracle,说明是服务器dispatcher的问题:
查看了一下dispatcher的参数:
SQL>show parameter dispachers;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string
max_dispatchers integer
没有内容,添加一下服务器的配置:
SQL>alter system set dispatchers='(ADDRESS=(PROTOCOL=TCP)(HOST=NAME)(PORT=port)) scope=spile;
system altered.
可以查看一下我们修改的配置:
SQL> select name,network,paddr,status from v$dispatcher;
NAME
----
NETWORK
--------------------------------------------------------------------------------
PADDR STATUS
-------- ----------------
D000
(ADDRESS=(PROTOCOL=tcp)(HOST=gyc)(PORT=37090))
2C21A6EC WAIT
另外一个原因是监听不是本地的默认LISTENER监听修改成本地的监听。
SQL>alter system set local_listener='local_listener';
查看一下本地的监听:
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=g
yc)(PORT=1522))
静态监听和动态监听:
[oracle@gyc ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 04-AUG-2011 22:07:39
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gyc)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 04-AUG-2011 20:48:53
Uptime 0 days 1 hr. 18 min. 46 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gyc)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully