oracle scott和hr用户解锁和加锁

1.连接sqlPlus
2.查看所有用户的状态

select username,account_status from dba_users order by username;

3.解锁hr用户(scott同理)命令

alter user hr account unlock;

4.hr用户设置密码为 ‘password’

alter user hr  identified by password;

[3,4合并]

alter user hr  account unlock identified by password;

5.hr用户加锁

alter user hr  account lock;

6.password密码失效

alter user hr  password expire;

[5,6合并]

alter user hr account lock password expire;

7.切换用户
sql> conn hr/password;

你可能感兴趣的:(学习笔记)