跳转至

Oracle ORA-28001: the password has expired


2015-07-20 by dongnan

问题描述

登录Oracle数据库提示密码过期:

sqlplus dongnan/ywwd.net@//172.27.233.49:1521/hpns
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 22 15:40:38 2015

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

ERROR:
ORA-28001: the password has expired

这是由于 Oracle 11G的新特性所致,Oracle 11G创建用户时缺省密码过期限制是180天,如果超过180天用户密码未做修改则该用户无法登录。

解决方法

按照提示更改密码:

Changing password for pngroup
New password:           # 输入密码
Retype new password:    # 再次输入
Password changed

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> quit   # 退出
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

验证

使用新密码登录:

sqlplus dongnan/ywwd.net@//172.27.233.49:1521/hpns

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 22 15:41:02 2015

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

扩展

如果觉得到期修改过于繁琐,可以将口令有效期默认值180天修改成无限制

sqlplus "/as sysdba" alter profile default limit password_life_time unlimited;

参考

Oracle提示错误消息ORA-28001: the password has expired

回到页面顶部