Friday, July 3, 2015

How to unlock User and Unexpire User in Oracle DB?

  • Login as Admin
    SQL> connect / as SYSDBA
    Connected
  • How to find accounts are expired and locked?
    select username, account_status from dba_users where ACCOUNT_STATUS LIKE '%EXPIRED%';
  • Unexpired Accounts 
    once an account has been expired, it can only be alter by assigning it a new password:
    ALTER USER HR IDENTIFIED BY HR;
  • Unlock Accounts
    ALTER USER HR ACCOUNT HR;
  • Disable default password expiry
    this all depends on the profile a user belongs to, to disable password expiry for all users assigned the default user profile do this:
    ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Unlock Account from SQL developer
        Log in as sys or system, then often three other user node and right click the hr user. Select edit from the           context menu and remove the check mark from 'lock account' 


No comments:

Post a Comment