Account locking or expiry issue is one the common problem Oracle Developers might have encountered in their career. We will examine how to unlock or reset the locked or expired user account.

Account Expired

When trying to logon a user it says below message.

Account_Expired

Here account is expired.

Why account expired  :- If user is not logged into an account for certain period (generally it is 6 month ) it will be expired.

How to reset the expiry ?

Method 1:- If you have not the dba privilege, please contact DBA.

Method 2:- If you have DBA privilege then

a)   Open command prompt or unix shell

b) type sqlplus /nolog

c) type connect sys as sysdba

d) enter the sysdba password when prompting

e) run alter command – alter user manoj identified by manoj;

(Here manoj is the user, manoj is the password )

alter_user

Account Locked

If user attempting maximum number of incorrect credential ( username or password ) account will be locked ( Also dba also can lock an account  using command – alter user manoj account lock; )

Account_Locked

Here account is locked.

How to unlock the account ?

Method 1 :-  If you are not the DBA, please seek help from DBA to unlock the account

Method 2 :- If you have DBA privilege then

a)   Open command prompt or unix shell

b) type sqlplus /nolog

c) type connect sys as sysdba

d) enter the sysdba password when prompting

e) run alter command – alter user manoj identified by manoj;

(Here manoj is the user, manoj is the password )

alter_user

Best Practices

  1. Use a easy to remember password
  2. Never try maximum allowed attempts to enter into an account, it might get locked. If you are not sure seek help from DBA or reset the password
  3. If you are using a account which is used by other developers, please be very careful resetting password or trying maximum allowed attempt
  4. Change the password before it expire

 

Also read – how to reset password