// Oracle error reference

ORA-28000: the account is locked

The account was locked, by an administrator or automatically after too many failed logins, so Oracle refuses to log it in until it is unlocked.

Error code
ORA-28000
Category
Connection and login
Error message
The account is locked.

What it means

Oracle locks an account when an administrator runs ALTER USER ... ACCOUNT LOCK or when failed login attempts exceed the profile's FAILED_LOGIN_ATTEMPTS limit (10 in the default profile). The account then can't log in until it is unlocked or, if the profile sets PASSWORD_LOCK_TIME, until that time has passed.

Common causes

  • Too many failed logins, often an application or job still using an old password.
  • An administrator locked the account.
  • Sample or system accounts that are locked by default after installation.

How to fix it

  1. Check the status and when it was locked.

    SELECT username, account_status, lock_date, profile
    FROM dba_users WHERE username = 'APP_USER';
  2. Unlock it (and reset the password if that was the reason for the failures).

    ALTER USER app_user ACCOUNT UNLOCK;
    ALTER USER app_user IDENTIFIED BY "N3w-Strong-Pass" ACCOUNT UNLOCK;
  3. Find and fix whatever keeps logging in with the old password, or it will lock again.

Related errors

More connection and login errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

Work on Oracle in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.