使用ORACLE自带的utlpwdmg.sql脚本来实现
操作方法
1、create table proflileYYYYMMDD as select * from dba_profiles where profile='DEFAULT'
2、$ORACLE_HOME/rdbms/admin/utlpwdmg.sql先备份一份
3、修改utlpwdmg.sql,ALTER只保留verify_function_11G,其他PASSWORD_LIFE_TIME、PASSWORD_GRACE_TIME、PASSWORD_REUSE_TIME、PASSWORD_REUSE_MAX、FAILED_LOGIN_ATTEMPTS、PASSWORD_LOCK_TIME都删除掉
只保留如下红色字体内容
ALTER PROFILE DEFAULT LIMIT
PASSWORD_VERIFY_FUNCTION verify_function_11G;
原来的内容如下
ALTER PROFILE DEFAULT LIMIT
PASSWORD_LIFE_TIME 180
PASSWORD_GRACE_TIME 7
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LOCK_TIME 1
PASSWORD_VERIFY_FUNCTION verify_function_11G;
4、比对如下结果
select * from dba_profiles where profile='DEFAULT' and RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';
select * from proflileYYYYMMDD where RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';
192.168.8.7操作界面
SQL> select * from proflile20181219 where RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';
PROFILE RESOURCE_NAME RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD NULL
SQL> @utlpwdmg.sql
Function created.
Grant succeeded.
Profile altered.
Function created.
Grant succeeded.
SQL> select * from dba_profiles where profile='DEFAULT' and RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';
PROFILE RESOURCE_NAME RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G