首页 > 其他 > 详细

创建profile时 sessions_per_user的用法:

时间:2016-07-08 21:54:20      阅读:459      评论:0      收藏:0      [点我收藏+]

举例 :

为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的用法:

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!