Sunday 9 March 2014

Troubleshooting Error 1017 received logging on to the standby (Error 1034 received logging on to the standby. PING[ARC2]: Heartbeat failed to connect to standby 'STBYKOL'. Error is 1034)

Hi Guys,

  Here is an Interesting case and  I was stuck with the problem since last 2 days and a half. In fact I was almost done with everything to resolve the mentioned problem but I could not able to solve almost.

Then I left it as I became exhausted, But I kept on thinking Where could be the problem, at last I got it.

Here was my case:
--------------------

  I have 2 node rac as primary and a standby was intended to create on single node.

   I changed parameter file, created passwords, tns entries accordingly. Then I did duplicate target and restored database as standby. After doing everything I saw, RAC node1 was able to send archive logs to dest_2 which is my standby but unfortunately node2 was unable to enter into standy database.

Here are

Problem Statement:
----------------------------

Standby was receiving node1's log files but node2 was unable to send logfiles due to the below error

Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.

Steps for diagnosing
----------------------------
step-1
 when I checked  query on node 2

sql>select DEST_ID,DEST_NAME,STATUS,BINDING,ERROR from v$ARCHIVE_DEST where status<>'INACTIVE';

all log file location were valid

Sql> SELECT DESTINATION, STATUS, ERROR FROM V$ARCHIVE_DEST WHERE DEST_ID=2;

dest2 for archive log dest is valid

sql> select error_code,message from v$dataguard_status;

Error 1034 received logging on to the standby

PING[ARC2]: Heartbeat failed to connect to standby 'STBYDB'. Error is 1034.

Then I have done the below steps to resolve the problem

1.) alter system set  log_archive_dest_state_2=defer scope=both sid='*';

  (on primary RAC any node )

   Sql>recover managed standby database cancel;    (on standby side)

2) alter database set SEC_CASE_SENSITIVE_LOGON=FALSE scope=both sid='*';

 (on RAC side)

3) shutdown the standby database infact if possible primary also
then remove password files for all primary rac nodes and standby nodes and then created the password file on their respective server

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=system entries=5 force=y ignorecase=Y

 Then start the primary db (rac nodes by srvctl start database -d primaryDB )

4) alter system set LOG_ARCHIVE_DEST_2='SERVICE=STBYKOL ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STBYDB' scope=both sid='*';

 (on any primary rac node and standby db)

5) alter system set  log_archive_dest_state_2=enable scope=both sid='*'; (on any primary RAC node)

 6) recover standby database using current logfile disconnect; (on standby database)

After doing this I observed the alert log  and it worked

To check the database  syncing

on both side check the command

sql>select current_scn from v$database;

The value of primary and standby would be almost same


Hope It will help you guys

If any query don't forget to mail me at viewssharings.blogspot.in@gmail.com

 

No comments:

Post a Comment