信仰,追求

导航

Oracle中用户profile的用法--修改resource_limit

转载自:http://www.examda.com/oracle/zhonghe/20090809/094437871.html

可以通过使用profile文件对用户的属性进行定义,比如为product用户建立一个profile文件
  create profile product_profile limit SESSIONS_PER_USER 1;
  ——设置用户只能建立一个
  session的profile alter user product profile product_profile;
  —— 让product用户使用product_profile
  要使上面的限制生效,需要修改初始化参数resource_limit


  show parameter resource;
  NAME TYPE VALUE
  --------------------- ----------- -------------
  resource_limit boolean FALSE
  resource_manager_plan string


  可以看到resource_limit参数是false,修改为true
  alter system set resource_limit=true;


  可以查看dba_profiles视图来查看用户的默认属性
  修改的时候可以使用下面的方法,比如修改用户失败的登陆次数,默认是10,修改为unlimited

     alter profile PRODUCT_PROFILE limit FAILED_LOGIN_ATTEMPTS unlimited; ——修改失败登录次数的方法。

 

====================liuyou的补充===============

查看与修改资源限制状态,以oracle数据库的用户登录系统:

[oracle@INMSC3 ~]$ sqlplus inms/xxxxxx@OINMS

SQL> show parameter resource

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
resource_limit                       boolean     FALSE
resource_manager_plan                string
SQL> alter system set resource_limit=true;


System altered.

SQL> show parameter resource

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
resource_limit                       boolean     TRUE
resource_manager_plan                string
SQL> exit

修改成true过后,该用户再也不能登录了;

posted on 2011-10-20 22:44  百事乐  阅读(14057)  评论(0编辑  收藏  举报