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

Perbezaan utama antara MySQL dan SQLite adalah konsep reka bentuk dan senario penggunaan: 1. MySQL sesuai untuk aplikasi besar dan penyelesaian peringkat perusahaan, menyokong prestasi tinggi dan kesesuaian yang tinggi; 2. SQLITE sesuai untuk aplikasi mudah alih dan perisian desktop, ringan dan mudah dibenamkan.

Indeks dalam MySQL adalah struktur yang diperintahkan satu atau lebih lajur dalam jadual pangkalan data, yang digunakan untuk mempercepat pengambilan data. 1) Indeks meningkatkan kelajuan pertanyaan dengan mengurangkan jumlah data yang diimbas. 2) Indeks B-Tree menggunakan struktur pokok yang seimbang, yang sesuai untuk pertanyaan dan penyortiran pelbagai. 3) Gunakan pernyataan createIndex untuk membuat indeks, seperti createIndexidx_customer_idonorders (customer_id). 4) Indeks komposit boleh mengoptimumkan pertanyaan berbilang lajur, seperti createIndexidx_customer_orderonorders (customer_id, order_date). 5) Gunakan Jelaskan untuk menganalisis rancangan pertanyaan dan elakkan

Menggunakan transaksi dalam MySQL memastikan konsistensi data. 1) Mulakan transaksi melalui starttransaction, dan kemudian laksanakan operasi SQL dan serahkannya dengan komit atau rollback. 2) Gunakan SavePoint untuk menetapkan titik simpan untuk membolehkan rollback separa. 3) Cadangan Pengoptimuman Prestasi termasuk memendekkan masa urus niaga, mengelakkan pertanyaan berskala besar dan menggunakan tahap pengasingan yang munasabah.

Senario di mana PostgreSQL dipilih dan bukannya MySQL termasuk: 1) Pertanyaan Kompleks dan Fungsi SQL Lanjutan, 2) Integriti Data yang ketat dan Pematuhan Asid, 3) Fungsi Spatial Advanced diperlukan, dan 4) Prestasi tinggi diperlukan apabila memproses set data yang besar. PostgreSQL berfungsi dengan baik dalam aspek -aspek ini dan sesuai untuk projek -projek yang memerlukan pemprosesan data yang kompleks dan integriti data yang tinggi.

Keselamatan pangkalan data MySQL dapat dicapai melalui langkah -langkah berikut: 1. 2. Transmisi yang disulitkan: Konfigurasi SSL/TLS untuk memastikan keselamatan penghantaran data. 3. Backup dan Pemulihan Pangkalan Data: Gunakan MySQLDUMP atau MySQLPUMP untuk data sandaran secara kerap. 4. Dasar Keselamatan Lanjutan: Gunakan firewall untuk menyekat akses dan membolehkan operasi pembalakan audit. 5. Pengoptimuman Prestasi dan Amalan Terbaik: Mengambil kira kedua -dua keselamatan dan prestasi melalui pengindeksan dan pengoptimuman pertanyaan dan penyelenggaraan tetap.

Bagaimana untuk memantau prestasi MySQL dengan berkesan? Gunakan alat seperti mysqladmin, showglobalstatus, perconamonitoring dan pengurusan (PMM), dan mysql enterprisemonitor. 1. Gunakan mysqladmin untuk melihat bilangan sambungan. 2. Gunakan showglobalstatus untuk melihat nombor pertanyaan. 3.Pmm menyediakan data prestasi terperinci dan antara muka grafik. 4.MySqLenterPrisemonitor menyediakan fungsi pemantauan yang kaya dan mekanisme penggera.

Perbezaan antara MySQL dan SQLServer adalah: 1) MySQL adalah sumber terbuka dan sesuai untuk sistem web dan tertanam, 2) SQLServer adalah produk komersil Microsoft dan sesuai untuk aplikasi peringkat perusahaan. Terdapat perbezaan yang signifikan antara kedua -dua enjin penyimpanan, pengoptimuman prestasi dan senario aplikasi. Apabila memilih, anda perlu mempertimbangkan saiz projek dan skalabiliti masa depan.

Dalam senario aplikasi peringkat perusahaan yang memerlukan ketersediaan yang tinggi, keselamatan maju dan integrasi yang baik, SQLServer harus dipilih bukannya MySQL. 1) SQLServer menyediakan ciri peringkat perusahaan seperti ketersediaan tinggi dan keselamatan maju. 2) Ia bersepadu dengan ekosistem Microsoft seperti VisualStudio dan PowerBI. 3) SQLServer melakukan pengoptimuman prestasi yang sangat baik dan menyokong jadual yang dioptimumkan memori dan indeks penyimpanan lajur.


Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

Video Face Swap
Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!

Artikel Panas

Alat panas

Pelayar Peperiksaan Selamat
Pelayar Peperiksaan Selamat ialah persekitaran pelayar selamat untuk mengambil peperiksaan dalam talian dengan selamat. Perisian ini menukar mana-mana komputer menjadi stesen kerja yang selamat. Ia mengawal akses kepada mana-mana utiliti dan menghalang pelajar daripada menggunakan sumber yang tidak dibenarkan.

Muat turun versi mac editor Atom
Editor sumber terbuka yang paling popular

Penyesuai Pelayan SAP NetWeaver untuk Eclipse
Integrasikan Eclipse dengan pelayan aplikasi SAP NetWeaver.

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

SecLists
SecLists ialah rakan penguji keselamatan muktamad. Ia ialah koleksi pelbagai jenis senarai yang kerap digunakan semasa penilaian keselamatan, semuanya di satu tempat. SecLists membantu menjadikan ujian keselamatan lebih cekap dan produktif dengan menyediakan semua senarai yang mungkin diperlukan oleh penguji keselamatan dengan mudah. Jenis senarai termasuk nama pengguna, kata laluan, URL, muatan kabur, corak data sensitif, cangkerang web dan banyak lagi. Penguji hanya boleh menarik repositori ini ke mesin ujian baharu dan dia akan mempunyai akses kepada setiap jenis senarai yang dia perlukan.
