Oracle SQL

What Does ORA-01017 Mean?

What Does ORA-01017 Mean
Written by shohal

Common Causes of ORA-01017

Wrong Username or Password

  • Typos or incorrect casing are the most frequent culprits.
  • Oracle is case-sensitive (from version 11g onward).

Case Sensitivity

  • If your user was created like this:
  • CREATE USER “JohnDoe” IDENTIFIED BY “SecurePass”;

You must use JohnDoe and SecurePass exactly, with the right case and quotes if needed.

Account Locked or Password Expired
Run the following SQL to check:

SELECT username, account_status FROM dba_users WHERE username = ‘JOHNDOE’;

If it’s locked:

ALTER USER JohnDoe ACCOUNT UNLOCK;

If the password is expired:

ALTER USER JohnDoe IDENTIFIED BY NewPassword123;

External Authentication

If the user is created for external authentication:

CREATE USER JohnDoe IDENTIFIED EXTERNALLY;

You won’t be able to log in with a password. Use OS or LDAP authentication instead.

Incorrect Connection String

Double-check your TNS string or EZConnect format.

Example correct syntax:

sqlplus JohnDoe/SecurePass@localhost:1521/ORCL

ERROR: ORA-01017: invalid username/password; logon denied

If you got

ERROR at line 1:

ORA-00922: missing or invalid option

Then you alter the session:

SQL> alter session set “_oracle_script”=true;

How can you create the user and then connect the user?

But when you try to connect, you get an error.

So, if you need to solve this issue, grant the permission.

📌 Internal

Link More Related Topic: https://techtweet.xyz/oracle/oracle-sql/

📌 External

Oracle Docs: ORA-01017

StackOverflow Discussion on ORA-01017

⚠️ Warning

💡 Tip: Always double-check the case when logging in with Oracle 11g or later.

⚠️ Warning: Avoid using _oracle_script in production environments.

Headings

  • What Is ORA-01017?
  • Common Causes
  • Fixing the Error
  • Creating Users Correctly
  • Preventing It in the Future

❓ FAQ

Q: Does ORA-01017 mean the user doesn’t exist?
A: Not necessarily. It usually means the password is incorrect, or the user is locked or misconfigured.

Q: Is Oracle case-sensitive with usernames?
A: Only if you create users in quotes (e.g., "JohnDoe"), then case matters.

👍 Was this helpful? Leave a comment below or explore more Oracle tips at Techtweet.xyz!

About the author

shohal

Leave a Comment