在itpub上写博客,感觉要比在CSDN上面写方便很多,第一次申请使用CSDN博客是在2010年,至今记忆犹新啦,但愿在这博客上面可以一直坚持下去,也给大家分享下原来写的一些博客:http://blog.csdn.net/dream19881003,感慨就发到这里吧,还是说下前一段时间预计客户的一个问题吧。
前一段时间客户打电话说自从数据库搬迁后连接数据库总是提示会话不可用,和客户沟通才知到他们连接数据库的程序是从早上连上数据库后就一直保持连接状态,一天中需要执行几次操作,由于数据库中的会话连接有超时限制,造成客户端长时间没有操作,就会断开连接。
经过这次事件总结了Oracle关于超时退出的一些设置:
4,sqlnet的inbound_connect_timieout_listener_name限制
单位是秒,默认值是60
Use the INBOUND_CONNECT_TIMEOUT_listener_name parameter to specify the time, in seconds, for the client to complete its connect request to the listener after the network connection had been established.
If the listener does not receive the client request in the time specified, then it terminates the connection. In addition, the listener logs the IP address of the client and an ORA-12525:TNS: listener has not received client's request in time allowed error message to the listener.log file.
To protect both the listener and the database server, Oracle Corporation recommends setting this parameter in combination with theSQLNET.INBOUND_CONNECT_TIMEOUT parameter in the sqlnet.ora file. When specifying values for these parameters, consider the following recommendations:
Set both parameters to an initial low value.
Set the value of the INBOUND_CONNECT_TIMEOUT_listener_name parameter to a lower value than the SQLNET.INBOUND_CONNECT_TIMEOUT parameter.
For example, you can set INBOUND_CONNECT_TIMEOUT_listener_name to 2 seconds and INBOUND_CONNECT_TIMEOUT parameter to 3 seconds. If clients are unable to complete connections within the specified time due to system or network delays that are normal for the particular environment, then increment the time as needed.
如果客户端在指定的时间内没有连接上数据库,会在listener.log日志中出现 ORA-12525,同时在alert日志中会报错ora-03136
This parameter sets the number of seconds that the listener waits to get a valid SQL*Net version 2 connection request after a connection has been started. The listener drops the connection if the timeout is reached. Default is 10; if set to 0, it will wait forever. |
参数值单位是秒,默认值是10s,如果建立监听后在设置的时间内没有反应将会断开连接。设置为0表示没有等待时间限制。
联系客服