oracle 線上用戶總是被鎖:數據庫
1,查明全部的用戶哪些被鎖了安全
SQL> select username,account_status,lock_date from dba_users; USERNAME ACCOUNT_STATUS ------------------------------ -------------------------------- LOCK_DATE ------------------- USER1 OPEN USER2 OPEN MGMT_VIEW OPEN
2,查看某個用戶(ABCuser這個用戶)是否被鎖:oracle
select LOCK_DATE,username from dba_users where username='ABCecuser';spa
LOCK_DATE爲空說明沒有鎖定,非空爲鎖定。code
3,解鎖方法
ALTER USER USER_NAME ACCOUNT UNLOCK;blog
4,通常數據庫默認是10次嘗試失敗後鎖住用戶
4.一、查看FAILED_LOGIN_ATTEMPTS的值
SQL> select * from dba_profiles where resource_name like 'FAILED_LOGIN_ATTEMPTS%';it
PROFILE RESOURCE_NAME RESOURCE
------------------------------ -------------------------------- --------
LIMIT
----------------------------------------
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD
10class
MONITORING_PROFILE FAILED_LOGIN_ATTEMPTS PASSWORD
UNLIMITEDdate
4.二、修改成30次
alter profile default limit FAILED_LOGIN_ATTEMPTS 30;file
4.三、修改成無限次(爲安全起見,不建議使用) alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;