Database users should not be locked
1) view the default number of database locks
[SQL]
- SQL>SetLinesize 2000
- SQL>Select*FromDba_profilesWhereResource_nameLike 'Failed _ LOGIN_ATTEMPTS %';
- PROFILE RESOURCE_NAME RESOURCE LIMIT
- --------------------------------------------------------------------------------------------------------------
- DEFAULTFAILED_LOGIN_ATTEMPTSPASSWORD10
- MONITORING_PROFILE FAILED_LOGIN_ATTEMPTSPASSWORDUNLIMITED
We can see from the above that the database is locked after 10 retries
2) view the last locked time
[SQL]
- SQL>SelectLOCK_DATE, usernameFromDba_usersWhereUsername ='Jscn';
If the value of LOCK_DATE is null, it indicates that it is not locked. If the value is not empty, it indicates that it is locked.
LOCK_DATE, username
-----------------------------------
13:36:10 JSCN
3) set the default logon times of the system.
[SQL]
- SQL>AlterProfileDEFAULTLimit FAILED_LOGIN_ATTEMPTS 10;-- Retries 10 locks in a row
- Profile altered.
- SQL>AlterProfileDEFAULTLimit FAILED_LOGIN_ATTEMPTS UNLIMITED;-- Do not lock
- Profile altered.
4) Unlock
[SQL]
- SQL>Alter UserJscn account unlock;
- UserAltered.