Home > Database > Mysql Tutorial > Java连接Oracle报错:the account is locked

Java连接Oracle报错:the account is locked

WBOY
Release: 2016-06-07 17:14:36
Original
1379 people have browsed it

用Java连接Oracle, 运行一段时间后,程序报错,连接失败,ora-28000 the account is locked, 出现这种原因,是因为用户被锁定了

用Java连接Oracle, 运行一段时间后,程序报错,连接失败,ora-28000 the account is locked,, 出现这种原因,是因为用户被锁定了,一般出现这种情况,有几个原因:

一、是因为程序连接数据库的数量大于配置的连接数;

二、在线程中一直用错误的秘码去连接数据库,导致Oracle数据库认为是有人在破解其密码,超过一定连接次数,就会把该用户上锁。

解决办法:

1.以超级管理员身份登陆Oracle,再执行解锁语句:alter user username account unlock;    (注:username为被上锁的用户名)

2.把连接池的连接数设置大一些。

3.以其他用户名登录Oracle-->选择myjob-->查看users-->找到被锁定的用户名,右击点击“编辑”-->把“帐户被锁住”的勾去掉-->点击“应用”再点击“关闭”-->重新登录-->OK.

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template