ORA-12514: TNS: Listener does not currently know of service requested in connect descriptor We are getting above error on Production when Client Application tries to connect using connection string. It is a DataGuard setup. Primary and Stand-by Host server.
Production support team said that- Our Primary DB is on StandBy host hence when it tries to connect to DB on Primary host it gives above error and after few seconds it connects to DB on Stand by host.
How can we avoid this error or troubleshoot?
The special service db unique name DGMGRL may not have been correctly registered with the listener, resulting in this starting problem.
Create a listener service and register it with the local listener on both the primary and failover/standby database instances if you want DGMGRL to automatically restart a standby database instance.
GLOBAL DBNAME should be a concatenation of the db name and the domain name: db unique name DGMGRL.db domain,
For example:
LISTENER = (DESCRIPTION = (ADDRESS_LIST=( ADDRESS=(PROTOCOL=tcp)(HOST=host_name) (PORT=port_num) ))) SID_LIST_LISTENER= (SID_LIST=( SID_DESC=(SID_NAME=sid_name) (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) ORACLE_HOME=oracle_home)))
To know furthermore about Listener.ora & tnsnames.ora, visit the below-mentioned link: