Oracle 11g 強制修改密碼 ORA-28001 的 處理方法

來源:互聯網
上載者:User

收到一個監控使用者無法串連資料庫的警示, Oracle提示錯誤訊息ORA-28001: the password has expired, 上去查看使用者狀態竟然是expired,擷取使用者基本資料指令碼如下:

connect / as sysdba;

col username for a16

col password for a18

col user_id for 999999

col account_status heading 'Account|Status' for a20

col default_tablespace heading 'Default|Tablespace' for a25

col temporary_tablespace heading 'Temporary|Tablespace' for a12

set lines 125

set pages 100

select username,user_id,password,account_status,default_tablespace,temporary_tablespace,to_char(created,'yyyy-mm-dd hh24:mi:ss') created

from dba_users

order by username;

這是Oracle11G的一個新特性, Oracle11G建立使用者時預設密碼到期限制是180天, 如果超過180天使用者密碼未做修改則該使用者無法登入。

查看PROFILE設定

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

DEFAULT  PASSWORD_LIFE_TIME PASSWORD 180

處理邏輯,將使用者密碼修改並判斷是否需要這個策略

ALTER USER 使用者名稱 IDENTIFIED BY 密碼 ;

語句進行修改密碼,密碼修改後該使用者可正常串連資料庫。

如果需要修改策略

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED

語句將口令有效期間預設值180天修改成“無限制”。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.