Oracle密碼過期the password has expired


調試Web項目的時候出現異常:

  1. java.sql.SQLException: ORA-28001: the password has expired
網上查了一下,是Oracle11g密碼過期的原因

連接Oracle,以Oracle用戶登陸,輸入以下命令

 

  1. select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'
結果顯示:

  1. PROFILE 
  2. ------------------------------------------------------------ 
  3. RESOURCE_NAME 
  4. ------------------------------------------------------------ 
  5. RESOURCE_TYPE 
  6. ---------------- 
  7. LIMIT 
  8. ------------------------------------------------------------ 
  9.  
  10. DEFAULT 
  11. PASSWORD_LIFE_TIME 
  12. PASSWORD 
  13. 180 
  14.  
  15. ------------------------------------------------------------ 
結果顯示密碼有效期是180天

 

輸入命令:

 

  1. alter profile default  limit password_life_time unlimited; 
  2. commit
再次執行:
  1. select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'
結果顯示為:
  1. PROFILE 
  2. ------------------------------------------------------------ 
  3. RESOURCE_NAME 
  4. ------------------------------------------------------------ 
  5. RESOURCE_TYPE 
  6. ---------------- 
  7. LIMIT 
  8. ------------------------------------------------------------ 
  9.  
  10. DEFAULT 
  11. PASSWORD_LIFE_TIME 
  12. PASSWORD 
  13. UNLIMITED 
  14. ------------------------------------------------------------ 
進行以上步驟之后需要改變密碼,否則還會出現password has expired異常

改變密碼的命令

  1. alter user XXXUSER identified by Welcome1; 
如果賬號被鎖住,則需要解鎖命令
  1. alter user XXXUSER identified by oracle account unlock; 

再次調試,問題解決

from: http://blog.csdn.net/android_robot/article/details/7598345


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM