您的位置:首页 > 数据库 > Oracle

在Oracle中给scott用户解锁

2012-04-23 10:29 302 查看
error: the account is locked
  学习 Oracle 一般 scott 用户(默认密码为tiger)登录。 scott 用户被锁定,可能是下面几个原因。

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

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

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

 解决方法:

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

  SQL> alter user scott account unlock;

  用户已更改。

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

  修改scott的登录密码:

  SQL> alter user scott identified by tiger;

  用户已更改。

  大功告成,此时 scott 和 tiger 就可以登录了!

  SQL> conn scott/tiger

  已连接。

  -------------------------------------------------

    Oracle 中给用户加锁与解锁的代码:

  SQL> alter user 用户名 account lock; (加锁)

  SQL> alter user 用户名 account unlock; (解锁)

文章来源:http://studiolongyuan.blog.sohu.com/156197623.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: