----查看缺省profile 中 密碼相關的參數配置信息
SQL> SELECT profile,resource_type,resource_name,limit FROM dba_profiles WHERE resource_type='PASSWORD' AND profile='DEFAULT';
PROFILE RESOURCE RESOURCE_NAME LIMIT
------------------------------ -------- -------------------------------- ----------------------------------------
DEFAULT PASSWORD FAILED_LOGIN_ATTEMPTS 10
DEFAULT PASSWORD PASSWORD_LIFE_TIME UNLIMITED
DEFAULT PASSWORD PASSWORD_REUSE_TIME UNLIMITED
DEFAULT PASSWORD PASSWORD_REUSE_MAX UNLIMITED
DEFAULT PASSWORD PASSWORD_VERIFY_FUNCTION NULL
DEFAULT PASSWORD PASSWORD_LOCK_TIME 1
DEFAULT PASSWORD PASSWORD_GRACE_TIME 7
7 rows selected.
-----調用oracle 的腳本生成密碼校驗函數
SQL> @?/rdbms/admin/utlpwdmg.sql
Function created.
Profile altered.
Function created.
再次查看配置結果:
SQL> SELECT profile,resource_type,resource_name,limit FROM dba_profiles WHERE resource_type='PASSWORD' AND profile='DEFAULT';
PROFILE RESOURCE RESOURCE_NAME LIMIT
------------------------------ -------- -------------------------------- ----------------------------------------
DEFAULT PASSWORD FAILED_LOGIN_ATTEMPTS 10
DEFAULT PASSWORD PASSWORD_LIFE_TIME 180
DEFAULT PASSWORD PASSWORD_REUSE_TIME UNLIMITED
DEFAULT PASSWORD PASSWORD_REUSE_MAX UNLIMITED
DEFAULT PASSWORD PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G------新生成的函數
DEFAULT PASSWORD PASSWORD_LOCK_TIME 1
DEFAULT PASSWORD PASSWORD_GRACE_TIME 7
7 rows selected.
-----如何修改profile 中配置參數:
alter profile DEFAULT limit PASSWORD_REUSE_MAX 5;
SQL> SELECT profile,resource_type,resource_name,limit FROM dba_profiles WHERE resource_type='PASSWORD' AND profile='DEFAULT';
PROFILE RESOURCE_TYPE RESOURCE_NAME LIMIT
--------- ---------------- ---------------------------------------------------------------- --------------------------------------------------------------------------------
DEFAULT PASSWORD FAILED_LOGIN_ATTEMPTS 10
DEFAULT PASSWORD PASSWORD_LIFE_TIME 180
DEFAULT PASSWORD PASSWORD_REUSE_TIME UNLIMITED
DEFAULT PASSWORD PASSWORD_REUSE_MAX 5
DEFAULT PASSWORD PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G
DEFAULT PASSWORD PASSWORD_LOCK_TIME 1
DEFAULT PASSWORD PASSWORD_GRACE_TIME 7
7 rows selected.
-----將password_ruse_max 改成unlimited
SQL> alter profile DEFAULT limit PASSWORD_REUSE_MAX UNLIMITED;
Profile altered.
SQL> SELECT profile,resource_type,resource_name,limit FROM dba_profiles WHERE resource_type='PASSWORD' AND profile='DEFAULT';
PROFILE RESOURCE_TYPE RESOURCE_NAME LIMIT
--------- ---------------- ---------------------------------------------------------------- --------------------------------------------------------------------------------
DEFAULT PASSWORD FAILED_LOGIN_ATTEMPTS 10
DEFAULT PASSWORD PASSWORD_LIFE_TIME 180
DEFAULT PASSWORD PASSWORD_REUSE_TIME UNLIMITED
DEFAULT PASSWORD PASSWORD_REUSE_MAX UNLIMITED
DEFAULT PASSWORD PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G
DEFAULT PASSWORD PASSWORD_LOCK_TIME 1
DEFAULT PASSWORD PASSWORD_GRACE_TIME 7
7 rows selected.