修改oracle用户密码复杂度
全备数据库
create directory arcl_dir as '/bakdata';
grant read,write on directory orcl_dir to system;
expdp导出源库数据
su - oracle
#全库导出
expdp system/oracle directory=arcl_dir full=y dumpfile=expdpfull_arcl.%U.dmp logfile=expdpfull_arcl.log parallel=2 cluster=N
环境检查
sqlplus “/as sysdba”
select * from v$version;
select * from dba_profiles;
查看有无verify_function函数
select object_name from all_objects where object_type='FUNCTION' AND object_name='VERIFY_FUNTION';
没有verify_function函数要创建
SQL>@$ORACLE_HOME/rdbms/admin/utlpwdmg.sql
select * from dba_profiles;
alter system set resource_limit = true;
alter profile default limit password_verify_function verify_function;
alter profile default limit password_lock_time 1/288;
alter profile default limit FAILED_LOGIN_ATTEMPTS 3;
alter profile default limit PASSWORD_LIFE_TIME 180;
检查
select * from dba_profiles;
SQL> select * from dba_profiles;
PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT
-------------------- ------------------------------ ------------------------ ---------------
DEFAULT COMPOSITE_LIMIT KERNEL UNLIMITED
DEFAULT SESSIONS_PER_USER KERNEL UNLIMITED
DEFAULT CPU_PER_SESSION KERNEL UNLIMITED
DEFAULT CPU_PER_CALL KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_CALL KERNEL UNLIMITED
DEFAULT IDLE_TIME KERNEL UNLIMITED
DEFAULT CONNECT_TIME KERNEL UNLIMITED
DEFAULT PRIVATE_SGA KERNEL UNLIMITED
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 3
DEFAULT PASSWORD_LIFE_TIME PASSWORD 180
PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT
DEFAULT PASSWORD_REUSE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION
DEFAULT PASSWORD_LOCK_TIME PASSWORD .0034
DEFAULT PASSWORD_GRACE_TIME PASSWORD 7
MONITORING_PROFILE COMPOSITE_LIMIT KERNEL DEFAULT
MONITORING_PROFILE SESSIONS_PER_USER KERNEL DEFAULT
MONITORING_PROFILE CPU_PER_SESSION KERNEL DEFAULT
MONITORING_PROFILE CPU_PER_CALL KERNEL DEFAULT
MONITORING_PROFILE LOGICAL_READS_PER_SESSION KERNEL DEFAULT
MONITORING_PROFILE LOGICAL_READS_PER_CALL KERNEL DEFAULT
PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT
-------------------- ------------------------------ ------------------------ ---------------
MONITORING_PROFILE IDLE_TIME KERNEL DEFAULT
MONITORING_PROFILE CONNECT_TIME KERNEL DEFAULT
MONITORING_PROFILE PRIVATE_SGA KERNEL DEFAULT
MONITORING_PROFILE FAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITED
MONITORING_PROFILE PASSWORD_LIFE_TIME PASSWORD DEFAULT
MONITORING_PROFILE PASSWORD_REUSE_TIME PASSWORD DEFAULT
MONITORING_PROFILE PASSWORD_REUSE_MAX PASSWORD DEFAULT
MONITORING_PROFILE PASSWORD_VERIFY_FUNCTION PASSWORD DEFAULT
MONITORING_PROFILE PASSWORD_LOCK_TIME PASSWORD DEFAULT
MONITORING_PROFILE PASSWORD_GRACE_TIME PASSWORD DEFAULT