Home  >  Article  >  Database  >  关于Oracle 10g scott用户解锁的方法两则

关于Oracle 10g scott用户解锁的方法两则

WBOY
WBOYOriginal
2016-06-07 16:53:07818browse

在安装完Oracle10g之后,想打开sql*plus来学习,然后按照书上的步骤用scott用户来连接数据库,可输了好几次都提示一个错误。 err

在安装完Oracle10g之后,想打开sql*plus来学习,然后按照书上的步骤用scott用户来连接数据库,可输了好几次都提示一个错误。

error: the account is locked

然后上网查了一下之后发现这个用户被锁定了,至于它为什么被锁定,可能是下面几个原因。

1.尝试多次登录未成功.(可能密码不正确)

2.此用户被管理员手工锁定.

3.用户密码到期.未按时修改密码.等等...

这个用户肯定是登陆不了了,然后我用system这个用户登录,可是登了半天都没有进去,又去网上查,网上面大都是关于 oracle 9i的用户和密码,后来我记得在安装的时候就提示输入了,用那个试了一下就连接上了,所以在oracle 10g的system这个用户的密码不是默认的,,而是安装的时候自己设定的。

拿system登录进去之后,执行下面的命令:

SQL> alter user scott account unlock;

用户已更改。

这样就完成解锁的操作。接下来,你还可以重新给scott这个用户设定密码

修改scott的登录密码

SQL> alter user scott identified by pan;

用户已更改。

ok了,你再拿scott 和 pan来登录就可以了!

SQL> conn scott/pan

已连接。

linux

Statement:
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