Search This Blog

Thursday, July 19, 2018

Fatal NI connect error 12514, connecting to: TNS-12564: TNS:connection refused

Issue -

Fatal NI connect error 12514, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.xyz.com)(PORT=9501))(CONNECT_DATA=(SERVICE_NAME=stby)(CID=(PROGRAM=oracle)(HOST=abc234.xyz.com)(USER=oracle))))

  VERSION INFORMATION:
        TNS for Linux: Version 12.1.0.2.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 12.1.0.2.0 - Production
  Time: 18-JUL-2018 11:59:41
  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


Assumption -


Issue started after failover test.
During the failover DGMGRL didn't work so had to execute failover command in SQL
Failover is successed - the standby DB became primary (old primary crash - intentionnally)
The errors are reporting on new primary database alert log.

Archive log shipping stopped
Verified the Listener and Tnsnames files - no issues found.

Rebuilt the standby server, during the process on standby DB realized the ARCHIVE_LOG_DEST_2 is in deffer/Null state.

once the LOG_ARCHIVE_DEST_2 set with PRIMARY_ROLE, the Fatal NI connect error 12514 disappear.
Example -
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=stby NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STBY';


Reference -

LOG_ARCHIVE_DEST_2 is currently ignored because this destination is valid only for the primary role. If a switchover occurs and this instance becomes the primary database.


https://docs.oracle.com/database/121/SBYDB/create_ps.htm#SBYDB4725
Archive Log Shipping From Primary to Standby Fails With ORA-12514 (Doc ID 563801.1)

No comments:

Post a Comment

Transportable tablespace refresh

  1.check tablespace for the user which need to refresh -------------------------------------------------------------------  SQL> select ...