故障现象:
SQL> connect scott/scott
ERROR:ORA-01017: invalid username/password; logon deniedSQL> connect scott/scottERROR:ORA-28000: the account is locked表明: 中 scott用户因密码不对,10次以后,就被locked。
SQL> select account_status,lock_date,profile from dba_users where username='SCOTT';
ACCOUNT_STATUS TO_CHAR(LOCK_DATE,'D PROFILE-------------------------------- -------------------- ------------------------------LOCKED(TIMED) 31-MAY-2004 19:33:53 DEFAULT这样,表明再添加oracle session时,就报错,无法连接上去。
故障解决:
(1) 给当前用户解锁:
sql> alter user scott account unlock;
(2) 查看当前用户的限制:
SQL> SELECT resource_name,resource_type,limit FROM dba_profiles WHERE profile='DEFAULT';
RESOURCE_NAME RESOURCE_TYPE LIMIT
-------------------------------- ------------- ----------------------------------------COMPOSITE_LIMIT KERNEL UNLIMITEDSESSIONS_PER_USER KERNEL UNLIMITEDCPU_PER_SESSION KERNEL UNLIMITEDCPU_PER_CALL KERNEL UNLIMITEDLOGICAL_READS_PER_SESSION KERNEL UNLIMITEDLOGICAL_READS_PER_CALL KERNEL UNLIMITEDIDLE_TIME KERNEL UNLIMITEDCONNECT_TIME KERNEL UNLIMITEDPRIVATE_SGA KERNEL UNLIMITEDFAILED_LOGIN_ATTEMPTS PASSWORD 10PASSWORD_LIFE_TIME PASSWORD UNLIMITEDPASSWORD_REUSE_TIME PASSWORD UNLIMITEDPASSWORD_REUSE_MAX PASSWORD UNLIMITEDPASSWORD_VERIFY_FUNCTION PASSWORD NULLPASSWORD_LOCK_TIME PASSWORD UNLIMITEDPASSWORD_GRACE_TIME PASSWORD UNLIMITED表明: 10次以后,就 failed_login_attempts 就报错,锁定用户。
需要修改成:unlimited
sql> alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;
或修改成:次数比较大:100000
sql>alter profile default limit FAILED_LOGIN_ATTEMPTS 100000;
然后再查看资源情况:
SQL> SELECT resource_name,resource_type,limit FROM dba_profiles WHERE profile='DEFAULT';RESOURCE_NAME RESOURCE_TYPE LIMIT
-------------------------------- ------------- ----------------------------------------COMPOSITE_LIMIT KERNEL UNLIMITEDSESSIONS_PER_USER KERNEL UNLIMITEDCPU_PER_SESSION KERNEL UNLIMITEDCPU_PER_CALL KERNEL UNLIMITEDLOGICAL_READS_PER_SESSION KERNEL UNLIMITEDLOGICAL_READS_PER_CALL KERNEL UNLIMITEDIDLE_TIME KERNEL UNLIMITEDCONNECT_TIME KERNEL UNLIMITEDPRIVATE_SGA KERNEL UNLIMITEDFAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITEDPASSWORD_LIFE_TIME PASSWORD UNLIMITEDPASSWORD_REUSE_TIME PASSWORD UNLIMITEDPASSWORD_REUSE_MAX PASSWORD UNLIMITEDPASSWORD_VERIFY_FUNCTION PASSWORD NULLPASSWORD_LOCK_TIME PASSWORD UNLIMITEDPASSWORD_GRACE_TIME PASSWORD UNLIMITED16 rows selected
SQL>
这样就不会用:client端因输入密码错误,造成用户被locked(timed)
原文链接:https://www.cnblogs.com/zougang/p/6512906.html