oracle密碼過期 ORA-28001: the password has expired

oracle 11g 默認密碼過期時間爲180天,

密碼過期後,訪問數據庫會出現如下異常:

java.sql.SQLException: ORA-28001: the password has expired


查詢密碼過期設定:

select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; 


修改密碼過期爲:unlimited


alter profile default  limit password_life_time unlimited;


將密碼設定修改爲unlimited後,可能繼續報the password has expired異常

此時,需修改密碼:


alter user user_name identified by password;


如果想繼續使用原來的密碼,可以將密碼修改爲另一個值後,再修改回來。


如果用戶被鎖定:java.sql.SQLException: ORA-28000: the account is locked

執行以下語句解除用戶鎖定:

alter user user_name account unlock;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章