2

I'm trying to setup data guard broker in my production instance. I have duplicated the primary database to standby database successfully. I've added primary database to data broker configuration and when I'm trying to add standby database following error is getting

DGMGRL> ADD DATABASE 'orcl_standby' AS CONNECT IDENTIFIER IS orcl_standby maintained as physical;
ERROR: ORA - 12154 : TNS: could not resolve the connect identifier specified

Tnsping from primary db to standby db and vice-versa is successful. I'm able to connect primary db from standby db using sqlplus sys/password@orcl as sysdba but when trying to connect to standby db from primary db, error is getting like

ORA - 12154 : TNS: could not resolve the connect identifier specified.

Tried out all possible solutions.

Below is my tnsnames.ora file

    ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.25.42)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (SID = orcl)
      (UR = A)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL_STANDBY=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.25.44)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl_standby)
      (SID = orcl_standby)
      (UR = A)
    )
  )      

Any help will be appreciated

  • The error is self-explananatory, orcl_standby can not be resolved. Put it into tnsnames.ora. – Balazs Papp Sep 7 '17 at 10:52
  • @BalazsPapp I've already added it to my tnsnames.ora file. Please find the tnsnames.ora which I have posted along with question. – Joe Joy Valiyaveettil Sep 7 '17 at 12:41
0

The part after IDENTIFIER IS must be a connection to the database. You should replace the orcl_standby with something like '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp) (HOST=<server of the Standby>)(PORT=1521)))(CONNECT_DATA=(SID=<the SID of the Standby>)(SERVER=DEDICATED)))'.

  • Is this the way to add standby database? ADD DATABASE 'orcl_standby' AS CONNECT IDENTIFIER IS '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp) (HOST=<server of the Standby>)(PORT=1521)))(CONNECT_DATA=(SID=<the SID of the Standby>)(SERVER=DEDICATED)))'; – Joe Joy Valiyaveettil Sep 7 '17 at 13:01
  • 1
    This is how I did it. It is the information that you normally put in the tnsnames.ora file. – Marco Sep 7 '17 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.