Oracle 11g 預設密碼期限問題 - ORA-28002

來源:互聯網
上載者:User

故障現象

Oracle Database 11g 資料庫普通使用者登入時提示 ORA-28002: the password will expire within 7 days

[11:01:00oracle@dvd db_1]$sqlplus wang/oracle

SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 16 11:01:23 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-28002: the password will expire within 7 days

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the OLAP and Data Mining options

wang@SUN>

故障原因

Oracle 11G 普通使用者有個180天的預設密碼周期,當快到期的時候即會出現此提示;

解決辦法

查看目前使用者對應profile、對應密碼周期

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

alter profile default limit password_life_time unlimited;

SELECT username,PROFILE FROM dba_users where username like upper('&USER');

sys@SUN> SELECT username,PROFILE FROM dba_users where username like upper('&USER');

Enter value for user: wang

old  1: SELECT username,PROFILE FROM dba_users where username like upper('&USER')

new  1: SELECT username,PROFILE FROM dba_users where username like upper('wang')

USERNAME                      PROFILE

------------------------------ ------------------------------

WANG                          DEFAULT

--查詢到該使用者對應的Profile檔案為 DEFAULT

sys@SUN> set lines 222

sys@SUN> col PROFILE for a20

sys@SUN> col RESOURCE_NAME for a20

sys@SUN> col RESOURCE_TYPE for a20

sys@SUN> col LIMIT for a20

sys@SUN> select * from dba_profiles where profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';

PROFILE              RESOURCE_NAME        RESOURCE_TYPE        LIMIT

-------------------- -------------------- -------------------- --------------------

DEFAULT              PASSWORD_LIFE_TIME  PASSWORD            180

--查詢到該profile對應的密碼生命週期配置為180天

修改目前使用者對應profile對應對應密碼周期

sys@SUN> alter profile default limit password_life_time 365;

Profile altered.

--修改該profile對應的密碼生命週期配置為365天

sys@SUN> alter profile default limit password_life_time unlimited;

Profile altered.

--修改該profile對應的密碼生命週期配置為 無限制

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.