怎样解决“ORA-28001: the password has expired”

本文介绍了解决Oracle数据库用户密码过期的问题。通过两步操作:首先以管理员身份解锁用户,然后以该用户身份登录并重置密码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

Oracle 数据库用户密码长时间没有修改过期,导致Oracle驱动抛出如下错误:

Caused by: java.sql.SQLException: ORA-28001: the password has expired

	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
	at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
	at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)

问题解决

解决此问题的方法有很多种,我列出一种,共两个步骤。

1. 以管理员用户登录,解锁相应的用户

sqlplus / as sysdba
alter user demo_user account unlock;
exit

2. 以已解锁锁的用户登录,重置密码

~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 13 15:06:09 2014

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

Enter user-name: demo_user
Enter password: 
ERROR:
ORA-28001: the password has expired


Changing password for demo_user
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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值