Wednesday, March 16, 2016

Failed to connect to remote database Error is ORA-01017

You may encounter above error in oracle dataguard environment- if you
    1) change the SYS user's password
or 2) change the SYSDG user's password - in 11g and above
or 3) remove any of password files 
or 4) remote_login_passwordfile parameter is not set to SHARED or EXCLUSIVE

Recently, I was asked to solve this problem for an environment- I saw they changed the SYS user's password in Primary database but didn't update this password to Standby databases.

You can't update the password in standby database directly. so solution is- after changing password in primary database, transfer the password file from primary to standby databases.

 Following are the steps to do this...

1) Shutdown the standby database
2) Rename the ORACLE_HOME\dbs\orapwHALIMDB this file on standby database.
3) Copy ORACLE_HOME\dbs\orapwHALIMDB from primary to standby database same location (assume HALIMDB is the instance name).
4) Then change this new file name to actual standby database's instance name.
5) Start standby database.

for transfer (in linux) you can use like below-

$scp oracle@primary_server_name:/u01/app/oracle/product/12.1/db_1/dbs/orapwHALIMDB   oracle@standby_server_name:/u01/app/oracle/product/12.1/db_1/dbs

Just FYI- actual error from database alert log file and data guard broker log file- (intentionally changed the instance name to halimdb )

Connection to database halimdb returns ORA-1017.
Please check if database halimdb is using a remote password file,
its remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and the SYS or SYSDG password is the same as this database.
Failed to connect to remote database halimdb. Error is ORA-01017
Failed to send message to site halimdb. Error code is ORA-01017.


No comments: