How to fix the Oracle error TNS-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA?

In this post, you’ll learn more about the Oracle ErrorTNS-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

TNS-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

Reason for the Error TNS-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

Cause: The listener was not configured with a default service and SERVICE_NAME was missing from the CONNECT_DATA received by the listener.

How to fix the Error TNS-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA ?

You can fix this error in Oracle by following the below steps

Action: Possible solutions are:

– Configure DEFAULT_SERVICE parameter in LISTENER.ORA with a valid service name. Reload the listener parameter file using reload []. This should be done by the LISTENER administrator.

– If using a service name, Check that the connect descriptor corresponding to the service name in TNSNAMES.ORA has a SERVICE_NAME or SID component in the CONNECT_DATA.

Tags :

Leave Your Comment