1. 程式人生 > >Oracle密碼過期the password has expired解決辦法

Oracle密碼過期the password has expired解決辦法

oracle 出現the password has expired這個問題,今天突然發現專案訪問不了,一查發現用不了,也登不進去, 這個問題由是Oracle11g密碼過期的原因導致的 除錯Web專案的時候出現異常: [java] view plaincopyprint? java.sql.SQLException: ORA-28001: the password has expired   網上查了一下,連線Oracle,以Oracle使用者登陸,輸入以下命令 [sql] view plaincopyprint? select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';   結果顯示: [html] view plaincopyprint? PROFILE   ------------------------------------------------------------   RESOURCE_NAME   ------------------------------------------------------------   RESOURCE_TYPE   ----------------   LIMIT   ------------------------------------------------------------        DEFAULT   PASSWORD_LIFE_TIME   PASSWORD   180        ------------------------------------------------------------   結果顯示密碼有效期是180天 輸入命令: [sql] view plaincopyprint? alter profile default  limit password_life_time unlimited;   commit;   再次執行: [sql] view plaincopyprint? select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';   結果顯示為: [sql] view plaincopyprint? PROFILE   ------------------------------------------------------------   RESOURCE_NAME   ------------------------------------------------------------   RESOURCE_TYPE   ----------------   LIMIT   ------------------------------------------------------------        DEFAULT   PASSWORD_LIFE_TIME   PASSWORD   UNLIMITED   ------------------------------------------------------------   進行以上步驟之後需要改變密碼,否則還會出現password has expired異常 改變密碼的命令 [sql] view plaincopyprint? alter user XXXUSER identified by Welcome1;   如果賬號被鎖住,則需要解鎖命令 [sql] view plaincopyprint? alter user XXXUSER identified by oracle account unlock;   再次除錯,問題解決