一
Oracle系統中的profile可以用來對用戶所能使用的數據庫資源進行限制
二
創建profile必須要有CREATE PROFILE的系統權限
為用戶指定資源限制
SQL> show parameter resource_limit
NAME TYPE VALUE
resource_limit boolean FALSE
SQL> alter system set resource_limit=true;
系統已更改
SQL> show parameter resource_limit;
NAME TYPE VALUE
resource_limit boolean TRUE
SQL>
三
CREATE PROFILE profile
LIMIT { resource_parameters
| password_parameters
}
[ resource_parameters
| password_parameters
]
<resource_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 }
}
< password_parameters >
{ { 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 }
}
四
profile
提示
Unlimited
Default
Resource_parameter部分
Session_per_user
Cpu_per_session
Cpu_per_call
Connect_time
Idle_time
Logical_reads_per_session
Logical_read_per_call
Private_sga
Composite_limit
Password_parameter部分
Failed_login_attempts
Password_life_time
Password_reuse_time和password_reuse_max
如
Password_lock_time
Password_grace_time
Password_verify_function
五
create profile new_profile
limit password_reuse_max
password_reuse_time
create profile app_user limit
sessions_per_user unlimited
cpu_per_session unlimited
cpu_per_call
connect_time
logical_reads_per_session default
logical_reads_per_call
private_sga
composite_limit
總的resource cost不超過五百萬service units
create profile app_users
failed_login_attempts
password_life_time
password_reuse_time
password_reuse_max
password_verify_function verify_function
password_lock_time
password_grace_time
SQL> alter user dinya profile app_user;
用戶已更改
SQL>
SQL> alter user dinya profile default;
用戶已更改
SQL>
From:http://tw.wingwit.com/Article/program/Oracle/201311/18119.html