2009-01-14 12:37 【转】TNS-12516問題重現及預防處理

作者: Tomac(http://tomac.itpub.net)
发表于: 2008.09.04 10:53
分类: 数据库
出处: http://tomac.itpub.net/post/8359/470150
---------------------------------------------------------------最近系統出現了TNS-12516問題,錯誤提示TNS:listener could not find available handler with matching protocol stack,
第一反應想到是listener出現了問題,于是把監聽停止,然后重新啟動。再從客戶端登錄,錯誤依然。想到可能這個系統 , 沒有被釋放。好再系統為RAC配置,把該節點重新啟動,恢復正常。
總想再認真看一下此錯誤是如何發生的,于是在測試環境進行了測試。

(1)調小process參數
alter system process = 20 scope=spfile;
(2)重新啟動
shutdown immediate;
startup;
(3)從客戶端登錄用戶。登錄第5個的時候出現了錯誤的提示。
sqlplus tmp/tmp@db1

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 3 19:27:26 2008

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

ERROR:
ORA-12516: TNS:監聽器找不到符合協定堆疊的可用處理程式


輸入使用者名稱:

(4) 查看登錄情況。此時從主機登錄也無法進行,process已經完全被使用。退出一個客戶端,
方可登錄。查看情況如下:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select count(*) from v$session;

COUNT(*)
----------
18

SQL> select count(*) from v$process;

COUNT(*)
----------
19

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

[oracle@T2 log]$ ps -ef | grep LOCAL
oracle 19371 1 0 16:56? 00:00:00 oraclendg(LOCAL=NO)
oracle 19893 1 0 17:01? 00:00:00 oraclendg(LOCAL=NO)
oracle 24865 1 0 17:54? 00:00:00 oraclendg(LOCAL=NO)
oracle 30558 1 1 18:52? 00:00:00 oraclendg(LOCAL=NO)
oracle 30593 18342 0 18:52 pts/0 00:00:00 grep LOCAL
[oracle@T2 log]$ ps -ef | grep ora_
oracle 18915 1 0 16:52? 00:00:00 ora_pmon_ndg
oracle 18917 1 0 16:52? 00:00:00 ora_psp0_ndg
oracle 18919 1 0 16:52? 00:00:00 ora_mman_ndg
oracle 18921 1 0 16:52? 00:00:00 ora_dbw0_ndg
oracle 18923 1 0 16:52? 00:00:00 ora_lgwr_ndg
oracle 18925 1 0 16:52? 00:00:00 ora_ckpt_ndg
oracle 18927 1 0 16:52? 00:00:01 ora_smon_ndg
oracle 18929 1 0 16:52? 00:00:00 ora_reco_ndg
oracle 18931 1 0 16:52? 00:00:00 ora_cjq0_ndg
oracle 18933 1 0 16:52? 00:00:01 ora_mmon_ndg
oracle 18935 1 0 16:52? 00:00:00 ora_mmnl_ndg
oracle 18968 1 0 16:52? 00:00:00 ora_qmnc_ndg
oracle 18978 1 0 16:52? 00:00:00 ora_q000_ndg
oracle 18980 1 0 16:52? 00:00:00 ora_q001_ndg
oracle 30595 18342 0 18:52 pts/0 00:00:00 grep ora_

(5) 結論,TNS-12516的確是process不足引起的。v$process比v$session多1在于PSEUDO進程。

(6) 引申問題:process 為20,而 v$process 中的數據為 19,并且PSEUDO沒有spid, 2個進程被什么使用了呢?

(7) 雖然系統中process設置的足夠大,但是仍然會出現此問題。一些非正常退出系統的連線,會遺留在系統中占用
process.可以使用下述sql檢查。

select t2.*
from v$sessioin t1, v$process t2
where t1.paddr(+) = t2.addr
and t1.paddr is null;

END.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11411056/viewspace-733370/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11411056/viewspace-733370/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值