Unlock the Account in Oracle

Revision as of 17:34, 6 January 2016 by Kipkis (Kipkis | contribs) (importing article from wikihow)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A user account can be locked by an expiration of a password and can be unlocked with a command.

Steps

  1. Find which accounts are locked with the following query.
    • SQL > select username,account_status from dba_users where account_status like '%LOCK%';
    • USERNAME ACCOUNT_STATUS
    • ------------------------------ ----------------
    • OUTLN EXPIRED & LOCKED
    • MDSYS EXPIRED & LOCKED
    • MDDATA EXPIRED & LOCKED
  2. Unlock the user with the following command.
    • SQL > alter user MDDATA account unlock; User altered.

Tips

  • You can also lock an account with the following:
    • SQL > alter user MDDATA account lock;
    • User altered.

Related Articles