How to Resolve TNS-12547: TNS:lost contact

  • by

TNS-12547

Let’s see how we reproduce TNS-12547.

C:\Users\ed>tnsping compdb 100

TNS Ping Utility for 64-bit Windows: Version 12.1.0.1.0 - Production on 22-JUL-2014 19:26:03

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:
C:\oracle\app\client\ed\product\12.1.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = primary0
1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = compdb)))
OK (20 msec)
OK (10 msec)
OK (20 msec)
OK (0 msec)
OK (10 msec)
...
TNS-12547: TNS:lost contact

C:\Users\ed>

We consecutively tnsping a remote listener 100 times to see its status change.

Solution

The listener could be hang or not responsive so that caused TNS-12547. You should restart (stop + start) current listener or try to fix it. Otherwise you should go for anyone of backup listeners to keep the continuity of database service.

For more connection troubleshooting, you may refer to Oracle 18c Net Services Administrator’s Guide: 15 Testing Connections.

Leave a Reply

Your email address will not be published. Required fields are marked *