ORA-01017: invalid username/password; logon denied

ORA-01017: invalid username/password; logon denied
Cause: An invalid username or password was entered in an attempt to log on to Oracle. The username and password must be the same as was specified in a GRANT CONNECT statement. If the username and password are entered together, the format is: username/password.
Action: Enter a valid username and password combination in the correct format.

Example:
C:\>sqlplus scott/tigerr@orcl
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 7 16:26:19 2015
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

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

Enter user-name:

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.

Once we get ORA-01017 and we are sure that our username or password was correct, we can perform following tasks to debug the issues.

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.

To read more about Oracle Case Sensitive Passwords, click here.

2) Check $ORACLE_SID and $ORACLE_HOME environmental variables to validate if we are trying to connect the right database.

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

4) Check is 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


Related Posts:
- Oracle Default Username and Password
- How to connect sqlplus without tnsnames.ora
- SQLNET: How does Oracle Client connect with Oracle Server
- How to configure Case Sensitive Password in Oracle
- ORA-28002: the password will expire within 7 days
- ORA-03135: connection lost contact
- ORA-01034: ORACLE not available

5 comments:

  1. With SYS check if the user really exists in the database and is not locked
    If so then change the password and try again.
    Is you get the error then verify the tns alias in tnsnames.ora (by default in $ORACLE_HOME/network/admin/) to be sure about the instance (or service) you want to connect to.

    ReplyDelete
  2. I would also add to list that you should check the user profile to see if the profile locks their account after so many days and/or tries.

    Tony Keller
    Oracle Consultant

    ReplyDelete
  3. Try to do this. If you install install oracle on Windows OS on C: so start it by this

    C:oracleproduct10.2.0db_1> cd bin
    C:oracleproduct10.2.0db_1bin>sqlplus sys as sysdba
    connected ..

    Or do the same if you install Oracle on Unix

    /opt/oracle/product/10.2.0/db_1/bin/sqlplus sys as sysdba
    connected ..

    ReplyDelete
  4. What OS are you on? Windows or Linux?
    What user are you logged in as?

    Things to check

    Is the user in the ora_dba group on the computer?
    What are the contents of SQLNet.ora file? You need SQLNET.AUTHENTICATION_SERVICES= (NTS) for / as sysdba to work.


    James Gordon
    Oracle DBA at IS Help

    ReplyDelete
  5. I would also add to list that you should check the user profile to see if the profile locks their account after so many days and/or tries. gold chain wholesale france , gold chain wholesale uk

    ReplyDelete