Tuesday 18 June 2013

ORA-16664: unable to receive the result from a database


Error Code: ORA-16664: unable to receive the result from a database


Case: You can see the redo shipping is working fine from Primary to standby DB. you can notice this error when you try to enable the DG broker.

Test the following:

1. connection to standby from Primary server - should be good if the redo shipping is fine
2. connection from standby to Primary server

This could be the cause - As during normal redo shipping we don't need the vice versa connection from standby to Primary but when you enable the DG Broker it needs that for the auto switchover, fail over.

From standby server, try to connect to the Primary DB

sqlplus sys@dg1_a as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 19 05:46:02 2013

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

Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

In My case  the issue is because I changed the tnsnames port to replicate the issue. 
From the standby drc*log also you can make out the same -

drc*.log location - same as alert log.

$ tail -f drc$ORACLE_SID.log
06/19/2013 05:37:54
Failed to send message to site dg1_a. Error code is ORA-16501.
06/19/2013 05:39:09
Failed to send message to site dg1_a. Error code is ORA-16501.
06/19/2013 05:40:24
Failed to send message to site dg1_a. Error code is ORA-16501.
06/19/2013 05:41:39
Failed to send message to site dg1_a. Error code is ORA-16501.
06/19/2013 05:42:44

Fix:

Check the tnsnames in the standby server and make it similar to the Primary server. Make sure you have right ports in tnsnames which is used in listener.ora and local_listener parameter.


Some other causes for the same issue:

The logon trigger was preventing the connection from the standby database during a switchover.
Fix: disable the logon trigger in primary database.  (Metalink id 1530881.1)

Check the non default port used in connect string of both primary and standby(tnsnames.ora). Metalink id 1228797.1


 






1 comment:

  1. Great tutorial just like your others that help in way standard tutorials don't. Do you have any ideas on this tns problem. I can create virtual environments no problem and with VMWare I have put together Data Guard as well as RAC configs. The problem is I can only do it with VMWare Fusion on my mac. When I use Virtualbox however I can't get it to work when again using internal network. Can ssh, scp etc but simply can tnsping between virtual hosts. Yes I could just VMWare Fusion but Virtualbox makes creating/attaching external shared drives so much more easy for RAC labs. Thanks again for the tutorial :-)

    ReplyDelete