This post describe about Oracle basic commands like, login, User password reset, User access lock and Unlock and others.
Root Privilege :
SQL> select username,account_status from dba_users;
USERNAME ACCOUNT_STATUS
------------------------------ ----------------------
SYSTEM OPEN
SYS OPEN
NEWGOURMEDA OPEN
ANONYMOUS OPEN
APEX_PUBLIC_USER LOCKED
APEX_040000 LOCKED
XS$NULL EXPIRED & LOCKED
Forgot SYS password in Oracle 11G:
SQL> ALTER USER sys IDENTIFIED BY new_password;
Create users:
SQL> CREATE USER users IDENTIFIED BY passwd;
User created.
Show Failed Login Attempts:
Default profile in oracle Database Management Software has 10 failed login attempts and after that it locks the user account, need to unlock this.
SQL> select * from dba_profiles where resource_name like 'FAILED_LOGIN_ATTEMPTS%';
PROFILE RESOURCE_NAME RESOURCE LIMIT
-------------------- ----------------------- -------- ------------
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 10
MONITORING_PROFILE FAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITED
Unlocked the users:
SQL> ALTER USER users ACCOUNT UNLOCK;
User altered.
Locked the user access:
SQL> ALTER USER users ACCOUNT LOCK;
User altered.
How set password attempts failed for user :
Before set password attempts failed for sepcific user, use CREATE PROFILE statement to create a profile for set limit for database resouce. The user can not exceed these limit.
The below command profile name is 'prof' and user name 'users
'
SQL> CREATE PROFILE prof LIMIT FAILED_LOGIN_ATTEMPTS 11 PASSWORD_LOCK_TIME 30;
Profile created.
SQL> ALTER USER users PROFILE prof;
User altered.
Comments (0)