举例 :
为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.
@ >
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。