oracle用户锁定问题(解锁上锁)

查看用户的信息和状态
select username,account_status from dba_users;

解锁 scott 用户:
alter user ljnc8085 account unlock

其中的 scott 即为要解锁的用户名。
alter user ljnc8085 identified by ljnc8085 account unlock --解锁并改密

select * from all_users

需要对Oracle某个用户设置输错密码也不被锁,整体原理是:新建一个profile,设置密码错误次数不限制,然后把用户的概要文件(profile)设置为新建的这个profile,下面介绍下设置的过程。

一、默认profile
一般数据库默认是10次尝试失败后锁住用户
1、查看FAILED_LOGIN_ATTEMPTS的值
select * from dba_profiles;

2、修改为6(重启发生)、30次
alter profile default limit FAILED_LOGIN_ATTEMPTS 6 scope=spfile;
alter profile default limit FAILED_LOGIN_ATTEMPTS 30;

3、修改为无限次(为安全起见,不建议使用)
alter profile default limit FAILED_LOGIN_ATTEMPTS unlimit;

posted @ 2022-03-31 18:32  流沙浩荡  阅读(237)  评论(0)    收藏  举报