The user will be locked if he enters the wrong password for multiple times and reaches a certain value.
-- 用户锁定方法
alter user 数据库名 account lock;
-- 用户解锁方法
alter user 数据库名 account unlock;
The following error will be reported when connecting to the database when locked.
An error occurred while establishing the connection:
Long Message:
ORA-28000: the account is locked
Details:
Type: java.sql.SQLException
Error Code: 28000
SQL State: 99999
View the maximum number of incorrect passwords for locked users.
select * from dba_profiles where resource_name = 'FAILED_LOGIN_ATTEMPTS';
The method of changing the maximum number of failed passwords.
-- 设置最大失败次数
alter profile default limit FAILED_LOGIN_ATTEMPTS 30;
-- 设置无限失败次数
alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;
Like it if you like it ❤!