The reason and method for the Oracle
user to be locked is informed that the test user is locked when logging in.
1. Log in with a user in the dba role to unlock it. First set the specific time format to view the specific time.
SQL> alter session set nls_date_format='yyyy-mm- dd hh24:mi:ss';
Session altered.
2. Check the specific locked time
SQL> select username,lock_date from dba_users where username='TEST';
USERNAME LOCK_DATE
-------------- ---------------- -------------------
TEST 2009-03-10 08:51:03
3. Unlock
SQL > alter user test account unlock;
User altered.
4. Check which ip caused the test user to be locked
View $ORACLE_HOME/network/admin/log/listener.log log
10-MAR-2009 08:51:03 * (CONNECT_DATA=(SID=lhoms)(SERVER=DEDICATED)(CID=(PROGRAM= oracle )(HOST=omstestdb )(USER=oraoms))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.69.1.11)(PORT=49434)) * establish * lhoms * 0
10-MAR-2009 08:51:03 * (CONNECT_DATA= (SID=lhoms)(SERVER=DEDICATED)(CID=(PROGRAM=oracle)(HOST=omstestdb)(USER=oraoms))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.69.1.11)(PORT=49435 )) * establish * lhoms * 0www.Examda.CoM The exam is about to take the exam.
It can be seen that the ip of 10.69.1.11 above is locked due to multiple failed login attempts.
Note:
Generally , the default database
is to lock user 1 after 10 failed attempts. , Check the value of FAILED_LOGIN_ATTEMPTS
select * from dba_profiles
2. Modify it to 30
alter profile default limit FAILED_LOGIN_ATTEMPTS 30;
3. Modify it to unlimited times (for security reasons, it is not recommended to use)
alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;