When trying to connect to my Oracle instance 12.1, I faced an issue where i was able to log in locally with SYS as SYSDBA but not remotely.
ORA-01017: invalid username/password; logon denied
In fact, for remote connection, Oracle is using a password file named “orapwSID” located in your “$ORACLE_HOME/dbs“.
Anyway, to solve this, you simply need to set your SYS password again. This will update the password file used over the network.
SQL> alter user sys identified by password;
You should now be able to connect remotely.
Some useful queries used during troubleshooting :
SQL> show parameter remote_login_passwordfile; SQL> select * from v$pwfile_users;
Another way to solve this would be to delete the password file or set the parameter below to “none“.
remote_login_passwordfile Oracle doc link : https://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams198.htm#REFRN10184