ORA-01017: invalid username/password; logon denied

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 05 Sep, 2023
  • 0 Comments
  • 58 Secs Read

ORA-01017: invalid username/password; logon denied

ORA-01017 is a very common error which we get while connection to Oracle Database.

Other than invalid Username/Password, it can be encountered dute to improper connect string, permissions isues or wrong configuration of tnsnames.ora or sqlnet.ora.

Solution :

1) If connecting to Oracle 11 or later, passwords can be configured as case sensitive. To check this configuration, run following by SYS/SYSTEM user


SQL> show parameter SEC_CASE_SENSITIVE_LOGON
NAME                           TYPE      VALUE
------------------------------ --------- ------------
sec_case_sensitive_logon       boolean   TRUE

You can change this configuration and alter password of user and try to connect


SQL> ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
System altered.

SQL> alter user scott identified by <password>;
User Altered.

SQL> CONN scott/<password>
Connected.

2) Check $ORACLE_SID and $ORACLE_HOME environmental variables to validate.

 

3) Check whether the user we are trying to connect exists on that instance. Run following by SYS/SYSTEM user.
SQL> SELECT username FROM dba_users where username='SCOTT';

USERNAME

------------------------------

SCOTT

4) Check TNSNAMES.ORA to validate that TNS-Alias we are using to connect Oracle Database is pointing to right Database Server and Instance.

Hope it Helps!