|
- CREATE PROFILE "PROFILE1" LIMIT CPU_PER_SESSION 500;
- select * from dba_profiles p where p.profile='PROFILE1';
- alter user hr profile profile1;
- select u.profile from dba_users u where u.username='HR';
复制代码
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 4 19:38:19 2017
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> show parameter resource
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- resource_limit boolean FALSE
- resource_manager_cpu_allocation integer 4
- resource_manager_plan string
- SQL> alter system set resource_limit=true;
- System altered.
- SQL> conn hr/oracle_4U
- Connected.
- SQL> select count(*) from employees;
- COUNT(*)
- ----------
- 107
- SQL> select count(*) from employees a , employees b ;
- COUNT(*)
- ----------
- 11449
- SQL> select count(*) from employees a , employees b , employees c ;
- COUNT(*)
- ----------
- 1225043
- SQL> select count(*) from employees a , employees b , employees c , employees d ;
- select count(*) from employees a , employees b , employees c , employees d
- *
- ERROR at line 1:
- ORA-02392: exceeded session limit on CPU usage, you are being logged off
- SQL>
复制代码- SQL> conn hr/oracle_4U
- Connected.
- SQL> select * from employees;
- select * from employees
- *
- ERROR at line 1:
- ORA-00604: error occurred at recursive SQL level 1
- ORA-02399: exceeded maximum connect time, you are being logged off
- SQL>
复制代码- select * from resource_cost;
- alter resource cost CPU_PER_SESSION 100;
复制代码- ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LOCK_TIME 0.000694444
- FAILED_LOGIN_ATTEMPTS 1
复制代码- ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LIFE_TIME 0.000694444
- PASSWORD_GRACE_TIME 0.000694444
复制代码
- select u.account_status,u.lock_date , u.expiry_date
- from dba_users u where u.username='HR';
-
- select * from dba_profiles p where p.profile='PROFILE1'
- and p.resource_type='PASSWORD';
-
-
-
- alter profile profile1 limit PASSWORD_REUSE_TIME 0.013888889
- PASSWORD_REUSE_MAX 1;
复制代码- select * from dba_objects o
- where o.object_name like 'VERIFY_FUNCTION%';
复制代码
|
|