Heim >Datenbank >MySQL-Tutorial >处理inactive状态的session_MySQL

处理inactive状态的session_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:30:531549Durchsuche

bitsCN.com

处理inactive状态的session

 

一,Session 状态说明

可以通过v$session 视图的status列查看session 的状态。

Sql代码  STATUS          VARCHAR2(8)          Status of the session:    ACTIVE - Session currently executing SQL    INACTIVE    KILLED - Session marked to be killed    CACHED - Session temporarily cached for use by Oracle*XA    SNIPED - Session inactive, waiting on the client  

 

 

 

二. 处理inactive 状态的session

2.1 在 sqlnet.ora文件中设置expire_time 参数

 

2.2 设置用户profile的idle_time参数

 

要启用idle_time 要先启用RESOURCE_LIMIT参数。 该参数默认是False。

 

Sql代码  show parameter resource;    ALTER SYSTEM SET RESOURCE_LIMIT=TRUE SCOPE=BOTH;    select * from dba_profiles;     select username,profile from dba_users where username='CQCPRODUCT';    alter profile default limit idle_time 10;  --需要重启下oracle

 


bitsCN.com
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn