I'm trying to connect to a remote instance as sysdba - however, I encounter the error: "ORA-01017: invalid username/password; logon denied".

$ sqlplus "sys/xxxx@<IP>:1521/sid1 as sysdba"

SQL*Plus: Release Production on Tue Sep 29 04:07:34 2015

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

ORA-01017: invalid username/password; logon denied

When I try to connect to another instance on the same server, I can get through:

$ sqlplus "sys/xxxx@<IP>:1521/sid2 as sysdba"

SQL*Plus: Release Production on Tue Sep 29 04:07:23 2015

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

Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Can someone point me to what I may have missed here?

3 Answers 3


Seems simply a password issue. Different instances may have different passwords, the SYS password is not necessarily the same for all the instances on the same server. Make sure remote_login_passwordfile is configured properly in the instances, and the password file exists for instance SID1 on the server in ORACLE_HOME/dbs/orapwSID1 (Linux-Unix) or ORACLE_HOME/database/pwdSID1.ora (Windows).

If you do not know the correct SYS password, you can recreate the password file, for example:

orapwd file=$ORACLE_HOME/dbs/orapwsid1 password=xxxx force=y


From Oracle ORA-01017 tips by Donald Burleson:

Checklist for ORA-01017 errors:

The core issue with an ORA-01017 error is an invalid user ID and passwords combination, but other than an incorrect password, there are user ID issues that may contribute to the ORA-01017 error:

  • It may be that the user ID is invalid for the target system - The user ID exists as the username column in the dba_users view.

    select username from dba_users;
  • Check your $ORACLE_SID environmental parameter. If your $ORACLE_SID is set to the wrong system ID then you may get a ORA-01017 error because you are connecting to the wrong database.

  • If using external OS user authentication (ops$ or remote_os_authent) you need to verify that the user ID is valid. You can tell if you are using external authentication because you connect without providing a user/password combination, and only provide a forward slash to the connect string, (e.g. connect / as sysdba;).

  • Check your tnsnames.ora to ensure that the TNS service name points to the correct server and instance name. If you specify an incorrect tnsnames.ora service name, then the user ID and password may not exist in that database.

You can find extra information in the SAP on Oracle discussion ORA-01017: invalid username/password; logon denied


I recently upgraded from Oracle 11g to 18C on a system using certain OS user. The next day I was trying to access that system through my own username(different from one with which I upgraded). Then, I got this error. I even used ORADIM to delete the existing sid and create a new one. However, after some time I realized that I had logged in using my own user. Then, I switched and the problem was gone!

  • How can your mistake be answer to this question? Why shouldn't one downvote this answer?
    – kAmol
    Commented Jan 29, 2021 at 5:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.