expire_time为每隔多少分钟检测一下dead connection(发送一个包到client),如果是dead connection,则是否session/process资源
idle_time为超过这一期限则把session状态设置为sniped,等下次交互的时候会断开连接并释放资源
sqlnet.expire_time
sqlnet.expire_time actually works on a different principle and is used to detect dead connections as opposed to disconnecting(actually ‘sniping’) a session based on idle_time which the profile accomplishes.
Sqlnet.expire_time basically instructs the Server to send a probe packet every set minutes to the client , and if it finds a terminated connection or a connection that is no longer in use, causes the associated server process to terminate on the server.
A valid database connection that is idle will respond to the probe packet causing no action on the part of the Server , whereas the resource_limit will snipe the session when idle_time is exceeded. The ‘sniped’ session will get disconnected when the user(or the user process) tries to communicate with the server again.
But again,as you mentioned, expire_time works globally while idle_time profile works for that user. You can use both of them to make sure that the client not only gets sniped but also gets disconnected if the user process abnormally terminates.
查看idle_time的设置可以先查看用哪个profile,然后再查询这个profile的设置
select username,profile from dba_users where username=’
select * from dba_profiles where profile = ‘


最新评论