ORA-12502 TNS-12502 TNS:listener received no CONNECT_DATA from client

TNS:listener received no CONNECT_DATA from client
Cause: No CONNECT_DATA was passed to the listener.
Action: Check that the service name resolved from TNSNAMES.ORA has the CONNECT_DATA component of the connect descriptor.

Below is the sample entry of tnsnames.ora:-

#When using SERVICE_NAME in CONNECT_DATA component
orcl.example.com =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

#When using SID in CONNECT_DATA component
orcl.example.com =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)

So for the service name please ensure you have the CONNECT_DATA clause in the tnsnames.ora, if you don’t have one please choose a SERVICE_NAME or SID clause.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.