Error
Error Code: ORA-01017

Oracle ORA-01017: Invalid Credentials

📦 Oracle Database
📋

Description

The ORA-01017 error indicates an authentication failure when connecting to an Oracle database. This typically occurs due to an incorrect username, password, or connection string configuration during logon attempts.
💬

Error Message

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

Known Causes

4 known causes
⚠️
Incorrect Credentials
The username or password entered does not match the credentials stored in the Oracle database.
⚠️
Case Sensitivity
Oracle usernames and passwords are case-sensitive. Ensure the correct case is used.
⚠️
Expired Password
The user's password may have expired, requiring a password reset.
⚠️
Incorrect Connection String
The connection string may have incorrect host, port, or service name, leading to authentication failure.
🛠️

Solutions

4 solutions available

1. Verify Username and Password easy

Double-check login credentials

1
Test connection with SQL*Plus
sqlplus username/password@database
2
Check for case sensitivity (12c+)
-- Oracle 12c+ has case-sensitive passwords by default
-- If password is 'MyPass123', you must enter exactly that

-- Check password case sensitivity setting
SELECT value
FROM v$parameter
WHERE name = 'sec_case_sensitive_logon';

2. Reset Password easy

Change the user's password if forgotten

1
Reset password as DBA
ALTER USER username IDENTIFIED BY new_password;
2
Unlock if account is locked
ALTER USER username ACCOUNT UNLOCK;

3. Check Special Characters in Password easy

Escape special characters properly

1
Quote password with special characters
-- Command line: wrap password in quotes
sqlplus username/"P@ss!word"@database

-- Or use /nolog and CONNECT
sqlplus /nolog
SQL> CONNECT username/"P@ss!word"@database
2
In connection strings, URL-encode special characters
# @ becomes %40
# ! becomes %21
# $ becomes %24
jdbc:oracle:thin:user/P%40ss%21word@host:1521:SID

4. Check User Status medium

Verify account is not locked or expired

1
Check user account status
SELECT username, account_status, lock_date, expiry_date
FROM dba_users
WHERE username = 'YOUR_USER';
2
Unlock and reset if needed
ALTER USER your_user IDENTIFIED BY new_password ACCOUNT UNLOCK;