criticalOracleError 01017

Oracle Error 01017: Invalid Username/Password; Logon Denied

Error Message
ORA-01017: invalid username/password; logon denied

What is Oracle Error 01017?

Oracle ORA-01017 is an authentication failure — the provided username/password combination was rejected by the Oracle database. Since Oracle 11g, passwords are case-sensitive by default, which is a common source of this error after database upgrades.

Common Causes

  • 1

    Incorrect username or password

  • 2

    Password case sensitivity — Oracle 11g+ enforces case-sensitive passwords by default

  • 3

    Account locked after too many failed attempts (ORA-28000 follows)

  • 4

    Password expired and must be changed before login

  • 5

    Using OS authentication but wrong OS user

  • 6

    Incorrect service name or SID in the connection string

Step-by-Step Solutions

1

Verify credentials: try connecting with sqlplus user/password@host:port/service

2

Check account status: SELECT username, account_status FROM dba_users WHERE username = UPPER('username');

3

Unlock account: ALTER USER username ACCOUNT UNLOCK;

4

Reset password: ALTER USER username IDENTIFIED BY new_password;

5

For case sensitivity issues: ALTER USER username IDENTIFIED BY 'CaseSensitivePass';

6

Check if password expired: if account_status = 'EXPIRED', run ALTER USER username IDENTIFIED BY new_pass;

Prevention Tips

  • Document password change procedures that include updating all connection configurations simultaneously

  • Use Oracle Wallet for secure credential storage instead of connection strings

  • Configure SEC_MAX_FAILED_LOGIN_ATTEMPTS appropriately to balance security and availability

  • Use service accounts with minimal required privileges

Frequently Asked Questions

Why did Oracle ORA-01017 start after upgrading to 11g?
Oracle 11g introduced case-sensitive passwords by default (SEC_CASE_SENSITIVE_LOGON = TRUE). Passwords set in 10g were stored as uppercase. After upgrade, the old password may need to be reset: ALTER USER username IDENTIFIED BY password; — Oracle will store the new case-sensitive version. Or temporarily disable: ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; (not recommended for production).
How do I check Oracle user account status?
SELECT username, account_status, lock_date, expiry_date FROM dba_users WHERE username = 'MYUSER'; Possible statuses: OPEN (normal), LOCKED (too many failed logins), EXPIRED (password expired), EXPIRED & LOCKED. Fix: ALTER USER MYUSER ACCOUNT UNLOCK; ALTER USER MYUSER IDENTIFIED BY new_password;

Related Errors

Still Stuck?

Ask our AI SQL Assistant or the community — get answers in seconds.