码迷,mamicode.com
首页 > 其他好文 > 详细

创建profile时 sessions_per_user的用法:

时间:2016-07-08 21:55:04      阅读:324      评论:0      收藏:0      [点我收藏+]

标签:sessions_per_user   oracle   

举例 :

为xiaoming 创建profile 同时允许两个用户连接进来

 

SYS@ odb>create profile prof_xiaoming limit sessions_per_user 2;

Profile created.

 

//用户和profile 绑定起来;

SYS@ odb>alter user xiaoming profile prof_xiaoming;    

 

User altered.

 

//赋予创建会话的权限

SYS@ odb>grant create session to xiaoming;

 

随后用该用户登录几个客户端都无报错;疑问:这里限制登录session数量为2 为何终端登录3个4个 还是可以的,没提示报错;

原来是没有启用资源限制


SYS@ odb>alter system set resource_limit=true;

System altered.

在重新以xiaoming用户登录就会提示 超出限制,不能登录;


SYS@ odb>conn xiaoming/xiaoming
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit


Warning: You are no longer connected to ORACLE.
@ >


创建profile时 sessions_per_user的用法:

标签:sessions_per_user   oracle   

原文地址:http://summervast.blog.51cto.com/690507/1812762

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!