ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 限制oracle数据库实例中的用户(user)总数

限制oracle数据库实例中的用户(user)总数

原创 Linux操作系统 作者:hbq_oracle 时间:2010-06-04 23:59:47 0 删除 编辑

如果要限制oracle数据库实例中用户(user)的总数,可以使用LICENSE_MAX_USERS来完成,如设置:LICENSE_MAX_USERS = 200
则限定数据库实例的总用户(user)数不能超过200

1.登录数据库
SQL]> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 23 09:14:58 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

2.检查license_max_users参数当前值
SQL> show parameter license_max_users;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
license_max_users integer 0

这里默认为0,表示不限制总数

3.检查当前数据库的用户数
SQL> select count(1) from dba_users;

COUNT(1)
----------
6

4.设置license_max_users参数,现在总用户数
SQL> alter system set license_max_users=6 scope=both;

System altered.

5.创建新用户,看用户总数的限制是否生效
SQL> create user test identified by test;
create user test identified by test
*
ERROR at line 1:
ORA-01985: cannot create user as LICENSE_MAX_USERS parameter exceeded

这里出现ORA-01985错误,证明license_max_users参数可以起到限制用户数的作用

 

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

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-04-17

  • 博文量
    10
  • 访问量
    11074