日期:2014-05-16  浏览次数:20480 次

ORACLE 中 PROFILE的管理

PROFILE的管理(资源文件)
????? 当需要设置资源限制时,必须设置数据库系统启动参数RESOURCE_LIMIT,此参数默认值为FALSE
????? 可以使用如下命令来启动当前资源限制:
????? alter system set RESOURCE_LIMIT=true;
????? 当需要以后启动时也启动限制,必须在init<SID>.ora中设置
????? RESOURCE_LIMIT=true

建立语法:
CREATE PROFILE profile LIMIT?
{ resource_parameters | password_parameters }?
[ resource_parameters | password_parameters ]...;

{ { SESSIONS_PER_USER | CPU_PER_SESSION | CPU_PER_CALL | CONNECT_TIME | IDLE_TIME????
???? | LOGICAL_READS_PER_SESSION | LOGICAL_READS_PER_CALL | COMPOSITE_LIMIT }
???? { integer | UNLIMITED | DEFAULT }
| PRIVATE_SGA { integer [ K | M ] | UNLIMITED | DEFAULT }
}

{ { FAILED_LOGIN_ATTEMPTS | PASSWORD_LIFE_TIME | PASSWORD_REUSE_TIME
???? | PASSWORD_REUSE_MAX | PASSWORD_LOCK_TIME | PASSWORD_GRACE_TIME }
???? { expr | UNLIMITED | DEFAULT }
| PASSWORD_VERIFY_FUNCTION { function | NULL | DEFAULT }
}

CREATE PROFILE new_profile
???? LIMIT PASSWORD_REUSE_MAX DEFAULT
?????????? PASSWORD_REUSE_TIME UNLIMITED;

CREATE PROFILE app_user LIMIT?
????? SESSIONS_PER_USER???????????? UNLIMITED?
????? CPU_PER_SESSION?????????????? UNLIMITED?
????? CPU_PER_CALL????????????????? 3000?
????? CONNECT_TIME????????????????? 45?
????? LOGICAL_READS_PER_SESSION???? DEFAULT?
????? LOGICAL_READS_PER_CALL??????? 1000?
????? PRIVATE_SGA?????????????????? 15K
????? COMPOSITE_LIMIT?????????????? 5000000;?

CREATE PROFILE app_user2 LIMIT
????? FAILED_LOGIN_ATTEMPTS 5
????? PASSWORD_LIFE_TIME 60
????? PASSWORD_REUSE_TIME 60
????? PASSWORD_REUSE_MAX UNLIMITED
????? PASSWORD_VERIFY_FUNCTION verify_function
????? PASSWORD_LOCK_TIME 1/24
????? PASSWORD_GRACE_TIME 10;
??????????
一、PROFILE的管理内容:
?????? 1、CPU的时间
?????? 2、I/O的使用
?????? 3、IDLE TIME(空闲时间)
?????? 4、CONNECT TIME(连接时间)
?????? 5、并发会话数量
?????? 6、口令机制: