喜欢就来多看看
How to use PROFILES to limit user resources
上一篇 /
下一篇 2007-12-11 00:00:00
/ 个人分类:@EBS
How to Create a Profile to Limit the IDLE_TIME Resource
1. Log into server manager as SYSDBA.
CONNECT /AS SYSDBA
Connected.
2. List the profiles currently on the system.
SVRMGR> SELECT * FROM DBA_PROFILES;
PROFILE RESOURCE_NAME LIMIT
------------------------------ -------------------------------- ---------
DEFAULT COMPOSITE_LIMIT UNLIMITED
DEFAULT SESSIONS_PER_USER UNLIMITED
DEFAULT CPU_PER_SESSION UNLIMITED
DEFAULT CPU_PER_CALL UNLIMITED
DEFAULT LOGICAL_READS_PER_SESSION UNLIMITED
DEFAULT LOGICAL_READS_PER_CALL UNLIMITED
DEFAULT IDLE_TIME UNLIMITED
DEFAULT CONNECT_TIME UNLIMITED
DEFAULT PRIVATE_SGA UNLIMITED
9 rows selected.
3. List the Oracle users and the profiles assigned to them.
SVRMGR> SELECT * FROM DBA_USERS;
USERNAME USER_ID PASSWORD
DEFAULT
_TABLESPACE TEMPORARY_TABLESPACE CREATED PROFILE
------------------------------ ---------- ------------------------------ -----
----------------------- ------------------------------ --------- -------------
---------------
SYS 0 D4C5016086B2DC6A
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
SYSTEM 5 D4DF7931AB130E37
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
DBSNMP 9 E066D214D5421CCC
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
MDSYS 10 72979A94BAD2AF80
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
SIDNEY 12 D0F36DAF9FE981AB
SYSTEM
SYSTEM 29-JUL-99 DEFAULT
5 rows selected.
4. If a profile other than DEFAULT does not exist, create a database resource
profile.
The statement below creates a profile called IDLETEST and limits the
IDLE_TIME to 60 minutes.
SVRMGR> CREATE PROFILE IDLETEST LIMIT IDLE_TIME 60;
Statement processed.
5. If a profile other than default exists, you can use that profile or create
a new one.
To use the existing profile, alter it.
The statement below alters profile IDLETEST to limit IDLE_TIME to 90 minutes.
SVRMGR> ALTER PROFILE IDLETEST LIMIT IDLE_TIME 90;
Statement processed.
6. Alter the user and assign them the profile with the resource limit.
SVRMGR> ALTER USER SIDNEY PROFILE IDLETEST;
Statement processed.
SVRMGR> SELECT * FROM DBA_USERS;
USERNAME USER_ID PASSWORD
DEFAULT
_TABLESPACE TEMPORARY_TABLESPACE CREATED PROFILE
------------------------------ ---------- ------------------------------ -----
----------------------- ------------------------------ --------- -------------
---------------
SYS 0 D4C5016086B2DC6A
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
SYSTEM 5 D4DF7931AB130E37
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
DBSNMP 9 E066D214D5421CCC
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
MDSYS 10 72979A94BAD2AF80
SYSTEM
SYSTEM 26-JUL-99 DEFAULT
SIDNEY 11 D0F36DAF9FE981AB
SYSTEM
SYSTEM 29-JUL-99 IDLETEST
5 rows selected.
7. After you set up the profile, you must either edit your INIT.ORA
file or your stored configuration in OEM and set:
RESOURCE_LIMIT=TRUE
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: