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 it 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
- A wrong password, including wrong upper/lower case.
- The user exists in a different PDB or database than the service you connected to.
- A SYSDBA or SYSOPER login whose password does not match the password file.
- An older client that does not support the password verifier the account uses.
- Special characters in the password that the tool or connection string altered.
How to fix it
- Type the password again, watching upper and lower case.
- Check the service name: a user created in one PDB does not exist in another.
- Ask a DBA to check the account in
DBA_USERS(status, PDB) and reset the password if needed. - For SYSDBA, make sure the password file is in sync with the SYS password.
- If the password contains special characters, enclose it in double quotes.
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.