This discussion is archived
1 2 3 Previous Next 39 Replies Latest reply: Nov 25, 2013 2:02 AM by Anar Godjaev RSS

I am not getting archive files in standby Error "Heartbeat failed to connect to standby ' database'. Error is 12514.

MHAIDAR Newbie
Currently Being Moderated

Dear All

 

I am gust posting this error, Already solve the problme but just of knowlege sharing

 

After I configured the primary database and mounted to create the standby controlfile

I did the following

Shut immediate;
and startup mount;
alter database set standby database to maximize availability;
alter database create standby controlfile as 'D:\app\admin\product\11.2.0\dbhome_1\database\controlstand.ctl';
==
Then I Start Copy the database files to secondary server
===

ON STANDBY SITE I did the following :
STARTUP NOMOUNT
ALTER DATABASE MOUNT STANDBY DATABASE
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

ON PRIMARY SITE:
ALTER DATABASE OPEN;
==

When I found in the primary alert log file that

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=CORSKMBBOR02.skmc.gov.ae)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=epprod1)(CID=(PROGRAM=d:\app\admin\product\11.2.0\dbhome_1\bin\ORACLE.EXE)(HOST=CORSKMBBOR01)(USER=SYSTEM))))

  VERSION INFORMATION:
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.3.0 - Production
  Time: 18-NOV-2013 11:13:03
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12564
   
TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
Error 12514 received logging on to the standby
Errors in file D:\APP\ADMIN\diag\rdbms\epprod1\epprod1\trace\epprod1_arc2_4520.trc:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
PING[ARC2]: Heartbeat failed to connect to standby 'epprod2'. Error is 12514.

===

 

After I did my search , I found that the service name and  DB_UNIQUE_NAME not match in the standby database

 

SQL> show parameter DB_UNIQUE_NAME

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      EPPROD2
SQL> select value from v$parameter where name = 'service_names';

VALUE
--------------------------------------------------------------------------------
EPPROD1

SQL>

 

I did

SQL> ALTER SYSTEM SET DB_UNIQUE_NAME='EPPROD2' SCOPE=SPFILE;

SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

SQL> SHUT IMMEDIATE;
Database dismounted.
ORACLE instance shut down.

SQL>STARTUP NOMOUNT

SQL>ALTER DATABASE MOUNT STANDBY DATABASE

SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

 

SQL> show parameter DB_UNIQUE_NAME

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      EPPROD2
SQL>
SQL>
SQL> select value from v$parameter where name = 'service_names';

VALUE
--------------------------------------------------------------------------------
EPPROD2

SQL>
SQL>

 

NOW is matching... and logs start to transfere from primary to secondary

 

Posted just to share ....

 

 

Thanks

1 2 3 Previous Next