oracle-databasesqlplusora-01017

Oracle sqlplus with sys as sysdba is failing with ORA-01017: invalid username/password; logon denied


Oracle sys user database connection with ORACLE_SID is not working. dev is my ORACLE_SID .

 sqlplus sys/manager@dev  as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Nov 25 01:25:33 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

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

But without ORACLE_SID connection is working

sqlplus sys/manager  as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Nov 25 01:34:05 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

Looks like this connection is using OS authentication. Because if I provide wrong password for sys user still connection works.

Any help why with ORACLE_SID sys user connection is not working?

In my database sec_case_sensitive_logon parameter is set to false.

SQL> show parameter sec_case_sensitive_logon

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE

Solution

  • Following was the root cause:

    remote_login_passwordfile parameter was set to EXCLUSIVE

    SQL> show parameter remote_login_passwordfile
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    remote_login_passwordfile            string      EXCLUSIVE
    

    REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file.

    For me password file was missing.

    Created password file

    orapwd file=$ORACLE_HOME/dbs/orapw<sid> password=<password> force=y ignorecase=n
    

    Bounce database.

    Then Oracle sys user database connection with ORACLE_SID is working.

    sqlplus sys/manager@dev  as sysdba
    
    SQL*Plus: Release 12.1.0.2.0 Production on Thu Nov 25 03:35:47 2021
    
    Copyright (c) 1982, 2014, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options