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
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
-
Check the status and when it was locked.
SELECT username, account_status, lock_date, profile FROM dba_users WHERE username = 'APP_USER';
-
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;
-
Find and fix whatever keeps logging in with the old password, or it will lock again.
Related errors
ORA-01017invalid username/password; logon deniedORA-28001the password has expired18486SQL Server: Login failed, account locked out
More connection and login errors
ORA-12154TNS: could not resolve the connect identifierORA-12514TNS: listener doesn't know the requested serviceORA-12505TNS: listener doesn't know the SIDORA-12541TNS: no listenerORA-12170TNS: connect timeout occurredORA-03113end-of-file on communication channelORA-03135connection lost contactORA-01034ORACLE not available
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
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.