Oracle 11g資料庫密碼到期ORA-28002問題處理方法
問題描述與分析:使用者在登入時報錯ORA-28002,(如)提示資料將在1天后到期。這是由於11g對於密碼的生命週期進行了控制,控制時間為180天。將其時間進行修改便能夠解決此問題,未報該錯誤的使用者,將按照修改後的來判斷,已出現警告的使用者需要進行密碼的修改,方可按照新定的時間進行判斷。
sqlplus串連時:
ORA-28002: the password will expire within 1 days
28002. 00000 - "the password will expire within %s days"
*Cause: The user's account is about to expire and the password
needs to be changed
*Action: change the password or contact the DBA
供應商代碼 28002
Oracle sql developer串連時:
pl/sql串連時:
處理方法:
1.串連資料庫檢查default profile檔案中的password_life_time參數
[oracle@tora01 diag]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 25 13:17:57 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
PROFILE RESOURCE_NAME RESOURCE
------------------------------ -------------------------------- --------
LIMIT
----------------------------------------
DEFAULT PASSWORD_LIFE_TIME PASSWORD
180
2. 修改password_life_time參數為unlimited(此處按照要求更改,處於怕以後再次出到期,直接unlimited)
SQL> alter profile default limit password_life_time unlimited;
Profile altered.
3. 再次檢查此參數
SQL> select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
PROFILE RESOURCE_NAME RESOURCE
------------------------------ -------------------------------- --------
LIMIT
----------------------------------------
DEFAULT PASSWORD_LIFE_TIME PASSWORD
UNLIMITED
4. 修改警示使用者的密碼
SQL> alter user testauchan identified by oracle;
User altered.
5. 驗證登入是否正常
[oracle@tora01 ~]$ sqlplus testauchan/oracle
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 25 13:41:58 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
總結:該參數是oracle為了安全而制定的,所以在DBA足夠控制的能力下,可將改為unlimited,否則還是要建議為使用天數限制。便於對密碼的安全變更。