ORA-12516: TNS: 监听程序找不到符合协议堆栈要求的可用处理程
在家接到同事电话,说数据库连不上,,连接报如下错误:
ORA-12516: TNS: 监听程序找不到符合协议堆栈要求的可用处理程
这种错误一般是连接满了,但是被他们重启以后连接又报改错误,感觉增大连接用处不大。登录到后台alert_jscn.log日志,看到如下错误:
Wed Apr 4 15:04:25 2012
WARNING: inboundconnection timed out (ORA-3136)
Wed Apr 4 15:04:25 2012
WARNING: inboundconnection timed out (ORA-3136)
Wed Apr 4 15:04:25 2012
WARNING: inboundconnection timed out (ORA-3136)
Wed Apr 4 15:04:25 2012
WARNING: inboundconnection timed out (ORA-3136)
下面内容参考网络
参考metalink上的345197.1文章,内容如下:
Symptoms
The Oracle Net 10g parameters SQLNET.INBOUND_CONNECT_TIMEOUT andINBOUND_CONNECT_TIMEOUT_listenername default to 0 (indefinite) in 10.1. To address Denial of Service (DOS)issues, the parameters were set to havea default of 60 (seconds) in Oracle 10.2.
If applications are longer than 60 secs to authenticate with theOracle database, the errors occur.The following may be seen in the alert log:WARNING: inbound connection timed out (ORA-3136)
SQLNET.INBOUND_CONNECT_TIMEOUT is set to a value in seconds anddetermines how long a client has to provide the necessary authenticationinformation to a database.
INBOUND_CONNECT_TIMEOUT_listenernameis set to a value in seconds and determines how long a client has to completeits connect request to the listener after the network connection has beenestablished.
To protect both the listener and the database server, OracleCorporation recommends setting INBOUND_CONNECT_TIMEOUT_listenername incombination with the SQLNET.INBOUND_CONNECT_TIMEOUT parameter.
Cause
Whenever default timeouts are assigned to a parameter, there may becases where this default does not work well with a particular application.However, some type of timeout on the connection establishment is necessary tocombat Denial of Service attacks on the database. In this case, SQLNET.INBOUND_CONNECT__TIMEOUTand INBOUND_CONNECT_TIMEOUT_listenername were given default values of 60seconds in Oracle 10.2. It is thesetimeout values that can cause the errors described in this note.
Also note thatit is possilbe the reason the database is slow to authenticate, may be due toan overloaded Oracle database or node.
Solution
Set theparameters SQLNET.INBOUND_CONNECT_TIMEOUT andINBOUND_CONNECT_TIMEOUT_listenername to 0 (indefinite) or to an appropratevalue for the application yet still combat DOS attacks (120 for example).
Theseparameters are set on the SERVER side:
listener.ora:INBOUND_CONNECT_TIMEOUT_listenername
sqlnet.ora: SQLNET.INBOUND_CONNECT_TIMEOUT
Further tuning of these parameters may beneeded is the problem persists
Metalink上给出的解决方案如下:
1. set INBOUND_CONNECT_TIMEOUT_=0 inlistener.ora
2. set SQLNET.INBOUND_CONNECT_TIMEOUT = 0in sqlnet.ora of server.
3. stop and start both listener anddatabase.
4. Now try to connect to DB and observe thebehaviour
以下是Oracle官方文档的一段:
SQLNET.INBOUND_CONNECT_TIMEOUT
Use theSQLNET.INBOUND_CONNECT_TIMEOUT parameter to specify the time, in seconds, for aclient to connect with the database server and provide the necessaryauthentication information.
If the clientfails to establish a connection and complete authentication in the timespecified, then the database server terminates the connection. In addition, thedatabase server logs the IP address of the client and an ORA-12170: TNS:Connecttimeout occurred error message to the sqlnet.log file. The client receiveseither an ORA-12547: TNS:lost contact or an ORA-12637: Packet receive failederror message.
Without thisparameter, a client connection to the database server can stay openindefinitely without authentication. Connections without authentication canintroduce possible denial-of-service attacks, whereby malicious clients attemptto flood database servers with connect requests that consume resources.
To protect boththe database server and the listener, Oracle Corporation recommends settingthis parameter in combination with the INBOUND_CONNECT_TIMEOUT_listener_nameparameter in the listener.ora file. When specifying values for theseparameters, consider the following recommendations:
Set both parameters to an initial lowvalue.
Set the value of theINBOUND_CONNECT_TIMEOUT_listener_name parameter to a lower value than theSQLNET.INBOUND_CONNECT_TIMEOUT parameter.
For example, you can setINBOUND_CONNECT_TIMEOUT_listener_name to 2 seconds and INBOUND_CONNECT_TIMEOUTparameter to 3 seconds. If clients are unable to complete connections withinthe specified time due to system or network delays that are normal for theparticular environment, then increment the time as needed.
修改listener的inbound_connect_timeout参数的方法
方法一:
$ lsnrctl
LSNRCTL for IBM/AIX RISC System/6000:Version 10.2.0.3.0 - Production on 29-OCT-2007 10:00:57
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help"for information.
LSNRCTL> help
The following operations are available
An asterisk (*) denotes a modifier orextended command:
start stop status
services version reload
save_config trace spawn
change_password quit exit
set* show*
LSNRCTL> show
The following operations are availableafter show
An asterisk (*) denotes a modifier orextended command:
rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration
LSNRCTL> showinbound_connect_timeout
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SHOW-100-12)(PORT=1521)))
LISTENER parameter"inbound_connect_timeout" set to 60
The command completed successfully
LSNRCTL> set inbound_connect_timeout0
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SHOW-100-12)(PORT=1521)))
LISTENER parameter"inbound_connect_timeout" set to 0
The command completed successfully
LSNRCTL> showinbound_connect_timeout
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SHOW-100-12)(PORT=1521)))
LISTENER parameter"inbound_connect_timeout" set to 0
The command completed successfully
LSNRCTL> set save_config_on_stop on #表示修改参数永久生效,否则只是临时生效,下次重启监听又还原为原来的值了
LSNRCTL> exit
方法二:
修改listener.ora文件,加入: INBOUND_CONNECT_TIMEOUT_LISTENER_NAME=0
更多Oracle相关信息见Oracle 专题页面 ?tid=12

在MySQL中創建和管理用戶賬戶的步驟如下:1.創建用戶:使用CREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password';2.分配權限:使用GRANTSELECT,INSERT,UPDATEONmydatabase.TO'newuser'@'localhost';3.修正權限錯誤:使用REVOKEALLPRIVILEGESONmydatabase.FROM'newuser'@'localhost';然後重新分配權限;4.優化權限:使用SHOWGRA

MySQL適合快速開發和中小型應用,Oracle適合大型企業和高可用性需求。 1)MySQL開源、易用,適用於Web應用和中小型企業。 2)Oracle功能強大,適合大型企業和政府機構。 3)MySQL支持多種存儲引擎,Oracle提供豐富的企業級功能。

MySQL相比其他關係型數據庫的劣勢包括:1.性能問題:在處理大規模數據時可能遇到瓶頸,PostgreSQL在復雜查詢和大數據處理上表現更優。 2.擴展性:水平擴展能力不如GoogleSpanner和AmazonAurora。 3.功能限制:在高級功能上不如PostgreSQL和Oracle,某些功能需要更多自定義代碼和維護。

MySQL支持四種JOIN類型:INNERJOIN、LEFTJOIN、RIGHTJOIN和FULLOUTERJOIN。 1.INNERJOIN用於匹配兩個表中的行並返回符合條件的結果。 2.LEFTJOIN返回左表的所有行,即使右表沒有匹配。 3.RIGHTJOIN與LEFTJOIN相反,返回右表的所有行。 4.FULLOUTERJOIN返回兩表中所有符合或不符合條件的行。

MySQL在高負載下的性能與其他RDBMS相比各有優劣。 1)MySQL通過InnoDB引擎和優化策略如索引、查詢緩存和分區表在高負載下表現良好。 2)PostgreSQL通過MVCC機制提供高效並發讀寫,Oracle和MicrosoftSQLServer則通過各自的優化策略提升性能。通過合理的配置和優化,MySQL可以在高負載環境中表現出色。

InnoDBBufferPool通過緩存數據和索引頁來減少磁盤I/O,提升數據庫性能。其工作原理包括:1.數據讀取:從BufferPool中讀取數據;2.數據寫入:修改數據後寫入BufferPool並定期刷新到磁盤;3.緩存管理:使用LRU算法管理緩存頁;4.預讀機制:提前加載相鄰數據頁。通過調整BufferPool大小和使用多個實例,可以優化數據庫性能。

MySQL与其他编程语言相比,主要用于存储和管理数据,而其他语言如Python、Java、C 则用于逻辑处理和应用开发。MySQL以其高性能、可扩展性和跨平台支持著称,适合数据管理需求,而其他语言在各自领域如数据分析、企业应用和系统编程中各有优势。

MySQL值得學習,因為它是強大的開源數據庫管理系統,適用於數據存儲、管理和分析。 1)MySQL是關係型數據庫,使用SQL操作數據,適合結構化數據管理。 2)SQL語言是與MySQL交互的關鍵,支持CRUD操作。 3)MySQL的工作原理包括客戶端/服務器架構、存儲引擎和查詢優化器。 4)基本用法包括創建數據庫和表,高級用法涉及使用JOIN連接表。 5)常見錯誤包括語法錯誤和權限問題,調試技巧包括檢查語法和使用EXPLAIN命令。 6)性能優化涉及使用索引、優化SQL語句和定期維護數據庫。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

mPDF
mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

Dreamweaver CS6
視覺化網頁開發工具