alter system set RESOURCE_LIMIT=true; --立即生效
添加一个oracle profile ,idle time 设置为1分钟
新建一个user,赋予connect和resource 权限,此user使用刚刚建立的profile
用此user登录sqlplus,不执行任何的命令,放置在那里即可
select * from v$session where 条件是此用户,主要查看status列,一开始是inactive,后来是sniped
等status状态变为sniped之后,去执行一条sql,就会报提示,
SQL> select * from user_tables where 1=2;
select * from user_tables where 1=2
*
第 1 行出现错误:
ORA-02396: 超出最大空闲时间, 请重新连接
此时select * from v$session where 条件是此用户 ,查询结果为空。[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/161195/viewspace-1053885/
,如需转载,请注明出处,否则将追究法律责任。