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

oracle 11g scott账户被锁定的解决方法

2014-10-29 22:56 302 查看
在安装完oracle 11g之后,想试试连接能否成功:

1、打开cmd命令中,用sqlplus scoot/tiger 登录时,提示:scott账户被锁定;

2、在cmd命令中,直接登录oracle:

输入sqlplus /as sysdba;

继续:alter user scott account unlock;

显示用户已更改i,这时账户已经解锁,可以测试连接;

3、在账户解锁的基础上,可以更改scott账户的密码:

执行:alter user scott identtified by XXX;(XXX是新密码)

显示用户已更改,然后测试连接;

oracle数据库连接的一些命令:

1、在cmd命令中输入sqlplus可以连接数据库,其格式为:

sqlplus 用户名/密码

如:sqlplus scott/tiger;

2、在SQL Plus 中输入conn可以连接数据库,其格式为:

SQL> conn 用户名/密码

如:conn scott/tiger;

3、在SQL Plus修改普通用户密码,其格式为:

aler user 用户名 identified by 密码

如:alter user scott identified by XXX;

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

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

SQL> alter user 用户名 account unlock;(解锁)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: