ORA-01017: Invalid Username/Password – Complete Solution
The ORA-01017: invalid username/password; logon denied error occurs when Oracle fails to authenticate a connection request. It can also be triggered by case-sensitivity settings, client/server version mismatches, or incorrect environment variables. The ORA-01017 error occurs when Oracle Database rejects login credentials due to incorrect username or password.
Error Message
ORA-01017: invalid username/password; logon denied
Causes
- Wrong username or password
- Case sensitivity issue
- User account locked
- Expired password
Solutions
1. Immediate Fix: Reset the Password
If you are unsure of the current credentials, the most direct fix is to reset them using administrative privileges.
- Open your command line and enter:
sqlplus / as sysdba. - Identify the user and set a new password:
ALTER USER your_username IDENTIFIED BY "NewPassword123";
3. If the account was locked due to too many failed attempts, unlock it simultaneously:
ALTER USER your_username ACCOUNT UNLOCK;
2. Handle Case Sensitivity
Starting with Oracle 11g, passwords are case-sensitive by default. If you are using an older client or want to disable this feature:
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
Note: You may need to reset the user's password again after changing this parameter for it to take effect.
3. Check Connection Identifiers
Sometimes the credentials are correct, but you are connecting to the wrong database instance or using an incorrect service name.
Conclusion
Always verify credentials and ensure the account is active.
No comments:
Post a Comment