今天在学习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/ ,如需转载,请注明出处,否则将追究法律责任。