1. Account Lockout
Failed_login_attempts: Used to specify the maximum number of failed consecutive logons.
Password_lock_time: Used to specify the number of days the account is locked.
03:34:13 sql> Create profile Lock_account limit
03:36:51 2 failed_login_attempts 3
03:37:07 3 Password_lock_time 10;
Profile created.
02:56:45 sql> Select Profile, resource_name, limit from dba_profiles
02:57:20 2 where profile= ' Lock_account ';
Profile Resource_name LIMIT
------------------------------ -------------------------------- ----------------------------------------
Lock_account Composite_limit DEFAULT
Lock_account Sessions_per_user DEFAULT
Lock_account cpu_per_session DEFAULT
Lock_account Cpu_per_call DEFAULT
Lock_account logical_reads_per_session DEFAULT
Lock_account Logical_reads_per_call DEFAULT
Lock_account Idle_time DEFAULT
Lock_account Connect_time DEFAULT
Lock_account PRIVATE_SGA DEFAULT
Lock_account failed_login_attempts 3
Lock_account Password_life_time DEFAULT
Lock_account Password_reuse_time DEFAULT
Lock_account Password_reuse_max DEFAULT
Lock_account password_verify_function DEFAULT
Lock_account Password_lock_time. 0006
Lock_account Password_grace_time DEFAULT
Rows selected.
03:38:02 sql> Create user test identified by test;
User created.
03:38:11 sql> alter user test profile Lock_account;
User Altered
02:59:09 sql> SELECT username,profile from Dba_users
02:59:18 2 WHERE username= ' TEST ';
USERNAME profile
------------------------------ ------------------------------
TEST Lock_account
03:38:31 sql> Select Username,account_status from Dba_users
03:39:23 2 where username= ' TEST ';
USERNAME Account_status
------------------------------ --------------------------------
TEST OPEN
03:40:00 sql> CONN test/123
ERROR:
Ora-01017:invalid Username/password; Logon denied
Warning:you are no longer connected to ORACLE.
03:40:03 sql> CONN test/123
ERROR:
Ora-01017:invalid Username/password; Logon denied
03:40:06 sql> CONN test/123
ERROR:
Ora-01017:invalid Username/password; Logon denied
03:40:07 sql> CONN test/123
ERROR:
Ora-28000:the account is locked
03:40:23 sql> Conn/as SYSDBA