ORA-12516問題處理
在測試環境中經常會遇到ORA-12516錯誤,登入資料庫報錯如下:
[oracle@D2-PISIT22 ~]$ sqlplus lissit/lissit@10.163.91.22:1521/pocsit02
SQL*Plus: Release 11.2.0.4.0 Production on Thu May 11 08:51:49 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12516: TNS:listener could not find available handler with matching protocol
stack
檢視監聽服務:
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:50:53
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:8095 refused:0 state:blocked
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
可以看到對於例項pocsit02的服務pocsit02,已經建立了8095個連線,狀態為blocked,處於封鎖狀態。
這個問題對於測試環境,直接重啟監聽和資料庫ok了,但生產環境就不能使用這麼重的方式了,可以執行如下語句重新讓pmon註冊一下監聽:
SQL> alter system register;
System altered.
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:54:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:8100 refused:0 state:ready
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
可以看到狀態變為ready了。也可以對監聽開一下跟蹤,然後關掉的方式來解決這個問題並重置連線數:
SQL> alter system set events='immediate trace name listener_registration level 3';
System altered.
SQL> alter system set events='immediate trace name listener_registration level 0';
System altered.
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:55:58
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
[oracle@D2-PISIT22 ~]$ sqlplus lissit/lissit@10.163.91.22:1521/pocsit02
SQL*Plus: Release 11.2.0.4.0 Production on Thu May 11 08:51:49 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12516: TNS:listener could not find available handler with matching protocol
stack
檢視監聽服務:
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:50:53
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:8095 refused:0 state:blocked
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
可以看到對於例項pocsit02的服務pocsit02,已經建立了8095個連線,狀態為blocked,處於封鎖狀態。
這個問題對於測試環境,直接重啟監聽和資料庫ok了,但生產環境就不能使用這麼重的方式了,可以執行如下語句重新讓pmon註冊一下監聽:
SQL> alter system register;
System altered.
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:54:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:8100 refused:0 state:ready
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
可以看到狀態變為ready了。也可以對監聽開一下跟蹤,然後關掉的方式來解決這個問題並重置連線數:
SQL> alter system set events='immediate trace name listener_registration level 3';
System altered.
SQL> alter system set events='immediate trace name listener_registration level 0';
System altered.
[oracle@D2-PISIT22 ~]$ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2017 08:55:58
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "pocsit02" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
LOCAL SERVER
Service "pocsit02XDB" has 1 instance(s).
Instance "pocsit02", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: D2-PISIT22, pid: 1690>
(ADDRESS=(PROTOCOL=tcp)(HOST=D2-PISIT22)(PORT=54841))
The command completed successfully
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28536251/viewspace-2138929/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-12516錯誤處理
- ORA-12516錯誤的處理(轉)
- 處理問題的方法
- perl中文處理問題
- 漢字處理問題?
- xml處理的問題XML
- 貨品問題處理
- [git] git問題處理Git
- golang json處理問題GolangJSON
- 併發問題處理方式
- ASMCMD處理問題一則ASM
- mysql的處理能力問題MySql
- RMAN處理split block問題BloC
- mysql問題處理兩則MySql
- Oracle啟動問題處理Oracle
- mysql 問題處理二則MySql
- Oracle壞塊問題處理Oracle
- 資料處理--pandas問題
- 如何處理 No DMARC Record Found 問題
- PHP 開發版本問題處理PHP
- MySQL:亂碼問題處理流程MySql
- JVM問題分析處理手冊JVM
- Linux 問題處理集錦Linux
- 處理SQLServer errorlog滿問題SQLServerError
- 如何處理HTTP 503故障問題?HTTP
- gc buffer busy acquire問題處理GCUI
- 記憶體分配問題處理記憶體
- RDSforMySQLMysqldump常見問題和處理ORMMySql
- ORA-00942問題處理
- crontab 問題檢查與處理
- ORA-38760 問題處理方法
- 一個NBU問題的處理
- Lotus notes問題與處理
- HTML + CSS處理常見問題HTMLCSS
- Java 大資料量處理問題Java大資料
- mysql的處理能力問題(2)MySql
- crontab對oracle操作問題處理Oracle
- 【問題處理】“NOT IN”與“NULL”的邂逅Null