您的位置:首页 > 数据库

如何将数据库账号(用户)解锁

2016-04-08 14:05 375 查看
--1
ALTER USER username ACCOUNT UNLOCK;
--2
sqlplus / as sysdba
alter user system account unlock

--3
默认的scott用户是被锁定的,先解锁就能登陆上了。
使用下面的语句解锁scott: alter user scott account unlock;
解锁之后可能会要求你改密码: alter user scott identified by tiger;
再登陆: sqlplus scott/tiger 就能登陆了
Oracle锁定和解锁用户的命令 SQL> conn /as sysdba 已连接。
//scott 用户在没有设定tieger默认密码时,
登陆不上锁定用户的方法: SQL> alter user test account lock; 用户已更改。
-------test用户登陆数据库,失败了。
C:\>sqlplus test/test ERROR: ORA-28000: the account is locked
 解锁的方法: SQL> conn /as sysdba SQL> alter user test account unlock; 用户已更改。

 

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