Oracle errors

ORA-01017: invalid username/password; logon denied

ORA-01017: invalid username/password; logon denied

The database rejected the login. Usually the password is wrong (passwords are case-sensitive), but the user may also not exist in the database or PDB you reached, or a SYSDBA login may not match the password file.

What ORA-01017 means

Oracle returns the same error for a wrong password and for a user that does not exist, so it does not say which one it was. Recent releases word the message as invalid credential or not authorized; logon denied.

Common causes of ORA-01017

How to fix ORA-01017

  1. Type the password again, watching upper and lower case.
  2. Check the service name: a user created in one PDB does not exist in another.
  3. Ask a DBA to check the account in DBA_USERS (status, PDB) and reset the password if needed.
  4. For SYSDBA, make sure the password file is in sync with the SYS password.
  5. If the password contains special characters, enclose it in double quotes.

ORA-01017 example

DBA: check the account and reset the password:

SELECT username, account_status, lock_date, expiry_date
  FROM dba_users
 WHERE username = 'APP_USER';

ALTER USER app_user IDENTIFIED BY "New#Passw0rd";

In SQLlightspeed

When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.

Related errors

ORA-12154ORA-12514ORA-01031 All Oracle errors →

Oracle documentation for ORA-01017. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.