当前位置: 代码迷 >> Oracle技术 >> ORA-12518: TNS: 监听程序无法分发客户机连接解决办法
  详细解决方案

ORA-12518: TNS: 监听程序无法分发客户机连接解决办法

热度:182   发布时间:2016-04-24 08:36:16.0
ORA-12518: TNS: 监听程序无法分发客户机连接
DIRECT_HANDOFF_TTC_LISTENER = OFF 也加载上了 最大连接数为500,可依然还报如标题的错误,请ORACLE高手指点,一般出现这种情况时 SESSION 数量为50 ,PROCESS 数量为53 谢谢

------解决方案--------------------
from metalink:556428.1

Cause
In general ORA-12518 occurs if there is a resource problem , may be on the listener side or on the Database server.

It indicates a condition where the process is not able to make any more memory allocations either due to non-availability of resource or the process has reached the 32 bit (VM Size) limit 
Solution
1- Timer issues causing abnormal threads :
Set the parameters SQLNET.INBOUND_CONNECT_TIMEOUT and INBOUND_CONNECT_TIMEOUT_listenername to 0 (indefinite) or to an approprate value for the application.
From Oracle base version 10.2.0.1 onwards the default value of INBOUND_CONNECT_TIMEOUT_<listenername> is 60 seconds. For previous releases it is zero by default.

a) Please add following parameter in listener.ora
INBOUND_CONNECT_TIMEOUT_<listener_name> = 0

For example, if the listener name is listenerTest, then:
INBOUND_CONNECT_TIMEOUT_listenerTest = 0

AND

b) Add the following parameter to the sqlnet.ora file on the Database server 
side:
SQLNET.INBOUND_CONNECT_TIMEOUT = 0

The listener and database will need to be restarted after these changes.

These parameters are set on the SERVER side:
listener.ora: INBOUND_CONNECT_TIMEOUT_listenername
sqlnet.ora: SQLNET.INBOUND_CONNECT_TIMEOUT

Note: This timeout restriction was introduced to combat Denial of Service (DoS) attack whereby malicious clients attempt to flood database servers with connect requests that consumes resources.

Fore more info/setting on inbound connection time out, check the following note :
Note 465043.1 - Troubleshooting ORA - 3136 WARNING Inbound Connection Timed Out

2 - Lack of available memory : 
Increase memory and swap in the system

3 - Less of processes in the database,:
Increase processes parameter if using dedicated connexion (init.ora / spfile file)
In unix, adjust resource limits to increase the number of max processes allowed. 

4 - Set /3GB option :
Switch in the BOOT.INI file to enable the 4GB feature.
This allows a process to address 3GB and reserving 1GB for the kernel. 

5- Tune SGA / shared_pool_size :
Reduce the SGA size to a reasonable figure which allows the user process to have enough memory to run.
Decrease the size of the database SGA by reducing the PGA_AGGREGATE_TARGET or SGA_MAX_SIZE or both. 
The amount of memory for a session depends upon PGA_AGGREGATE_TARGET.
If PGA_AGGREGATE_TARGET is set to a very small value ,Oracle session may exceed this value.

6 - Set or Tune MTS :
Configure MTS or increase the number of DISPATCHERS (if Shared Server is being used).

------解决方案--------------------
检查一下内存情况,估计是内存不够了,增大物理内存,或者减小sga,以前遇到过。
------解决方案--------------------
你用的32位的系统吧,基本上是内存不够用了,32位的系统SGA不能走过1.7G。
另外,也有可能是你的PGA设置的太小了,至少设置到256M吧
还有一个可能,你用的是unix的话,设置unix的swap更大一点
  相关解决方案