Oracle会话超时退出设置

简介:         在itpub上写博客,感觉要比在CSDN上面写方便很多,第一次申请使用CSDN博客是在2010年,至今记忆犹新啦,但愿在这博客上面可以一直坚持下去,也给大家分享下原来写的一些博客:http://blog.csdn.net/dream19881003,感慨就发到这里吧,还是说下前一段时间预计客户的一个问题吧。

        在itpub上写博客,感觉要比在CSDN上面写方便很多,第一次申请使用CSDN博客是在2010年,至今记忆犹新啦,但愿在这博客上面可以一直坚持下去,也给大家分享下原来写的一些博客:http://blog.csdn.net/dream19881003,感慨就发到这里吧,还是说下前一段时间预计客户的一个问题吧。
        前一段时间客户打电话说自从数据库搬迁后连接数据库总是提示会话不可用,和客户沟通才知到他们连接数据库的程序是从早上连上数据库后就一直保持连接状态,一天中需要执行几次操作,由于数据库中的会话连接有超时限制,造成客户端长时间没有操作,就会断开连接。
        
        经过这次事件总结了Oracle关于超时退出的一些设置:

          1 profile的idle_time限制

          2 profile的connect_time限制

          3 sqlnet的expire_time限制

           4 sqlnet的INBOUND_CONNECT_TIMEOUT_listener_name限制

          5 listener的CONNECT_TIMEOUT_listener_name限制

1,profile的idle_time限制
    oracle用户的配置文件的密码策略是实时生效的,所见即所得。但是用户配置文件的资源限制是由resource_limit参数决定的。
    单位是分钟,默认没记错的话应该是10分钟
    要是修改的资源生效,需要设置resource_limit设置为true
    alter system set resource_limit=true ;
    如果在idle的时间内用户没有执行任何操作,会提示ORA-02396:exceeded maximum idle time, please connect again
2,profile的connect_time限制
    默认是UNLIMITED,单位是分钟
    用户在到达设置的时候后,不可以在继续操作,会提示ORA-02399: exceeded maximum connect time, you are being logged off
    如果是设置1分钟,他会在将近2分钟的时候提醒你重新登录。
3,sqlnet的expire_time限制:
    expire_time主要是在指定的时间去探测客户端是否可以连通,如果可以的话重新计时,否则就会断开
在执行rman的时候遇见:
ORA - 03135: connection lost contact ,可以尝试将此值设置大些。(ID 729811.1)

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

5,listener的connect_timeout_listener-name限制,很少使用

CONNECT_TIMEOUT_ listener_name = number

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表示没有等待时间限制。

相关文章
|
4月前
|
Oracle 关系型数据库 Linux
Oracle设置监听之Navicat的锅
Oracle设置监听之Navicat的锅
32 0
|
Oracle 网络协议 关系型数据库
Oracle会话超时设置1:在sqlnet.ora和listener.ora中设置
这篇文章是Oracle会话超时设置的第一个文章,简述和Oracle 数据库 net services有关的会话超时管理。
1174 0
Oracle会话超时设置1:在sqlnet.ora和listener.ora中设置
|
SQL 运维 Oracle
Oracle 超时设置2:设置实例级参数
Oracle超时设置系列的第二篇文章,设置实例级参数
473 0
|
8月前
|
Oracle 关系型数据库 数据库
Oracle——给数据库的某个字段设置随机数
Oracle——给数据库的某个字段设置随机数
|
8月前
|
Oracle 关系型数据库 Linux
Oracle设置连接数进程数会话数
Oracle设置连接数进程数会话数
127 0
|
9月前
|
Oracle 关系型数据库
ORACLE中设置ID自增详细
ORACLE中设置ID自增详细
204 0
|
10月前
|
Oracle 关系型数据库 数据库
【Oracle】设置自增
Oracle Database,又名OracleRDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。它是在数据库领域一直处于领先地位的产品。可以说Oracle数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的适应高吞吐量的数据库解决方案。
144 0
|
10月前
|
Oracle 前端开发 关系型数据库
在Oracle的ADR中设置自动删除trace文件的策略
姚远在一个有两万个客户的公司做数据库支持,什么稀奇古怪的事情都能遇到,有个客户的数据库不停地产生大量的trace,经常把硬盘撑爆,看看姚远怎么解决这个问题的。
|
11月前
|
Oracle 关系型数据库
Oracle中filesystemio_options 和 disk_asynch_io 参数的设置
参考文档Doc ID 1987437.1 filesystemio_options参数,中间是这个参数的配置值。
158 0
|
Oracle 关系型数据库 数据库
Oracle 会话超时设置3:在用户profile文件中设置
Oracle会话超时设置系列的第三篇文章,介绍在用户profile文件中设置会话的超时设置。
472 0