ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 在Oracle中确保最终用户在数据库中只有一个会话

在Oracle中确保最终用户在数据库中只有一个会话

原创 Linux操作系统 作者:chinak62 时间:2010-04-28 14:53:31 0 删除 编辑

今天在学习tom的大作:Oracle9i 10g编程艺术中,提到oracle提供的一个新特性,觉得oracle真的博大精深呀。学习oracle一个月以来感触颇多。今天仅记录一下这个特性的实现,待后续有必要深入研究学习一下oracle  的profile

怎么在Oracle中确保最终用户在数据库中只有一个会话
ops$tkyte@ORA10G> create  profile one_session limit sessions_per_user 1;
Profile created.
ops$tkyte@ORA10G> alter  user  scott profile one_session;
User  altered.
ops$tkyte@ORA10G> alter  system set resource_limit=true;
System altered.
ops$tkyte@ORA10G> connect scott/tiger
Connected.
scott@ORA10G> host  sqlplus scott/tiger
SQL*Plus: Release 10.1.0.2.0  - Production on  Sun Nov 28 12:49:49 2004
Copyright (c) 1982,  2004, Oracle. All rights  reserved.
ERROR:
ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/180324/viewspace-661555/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-04-18

  • 博文量
    12
  • 访问量
    35605