EZConnect or Hostname Adapter Usage: ORA-12504
(Doc ID 2550189.1)
Last updated on APRIL 17, 2023
Applies to:
Oracle Net Services - Version 11.2.0.3 to 18.1.0.0.0 [Release 11.2 to 18.1]Information in this document applies to any platform.
Symptoms
While attempting to use the EZCONNECT Naming adapter, the following error is returned:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
Example:
sqlplus system@hostname.domain:port/service_name
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
An Oracle Net trace reveals that the SERVICE_NAME field is not populated when the connection attempt is being made:
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 00 00 28 44 45 53 43 52 |..(DESCR|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 49 50 54 49 4F 4E 3D 28 |IPTION=(|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 43 4F 4E 4E 45 43 54 5F |CONNECT_|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 44 41 54 41 3D 28 53 45 |DATA=(SE|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 52 56 49 43 45 5F 4E 41 |RVICE_NA|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 4D 45 3D 29 28 43 49 44 |ME=)(CID|<===nothing in SERVICE_NAME field
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 3D 28 50 52 4F 47 52 41 |=(PROGRA|
(4111095552) [17-APR-2019 22:13:40:047] nspsend: 29 29 |)) |
(4111095552) [17-APR-2019 22:13:40:048] niqme: entry
(4111095552) [17-APR-2019 22:13:40:048] niqme: reporting NS-12564 error as ORA-12564
(4111095552) [17-APR-2019 22:13:40:055] niqme: exit
(4111095552) [17-APR-2019 22:13:40:055] niomapnserror: exit
(4111095552) [17-APR-2019 22:13:40:055] niqme: entry
(4111095552) [17-APR-2019 22:13:40:055] niqme: reporting NSG-12504 error as ORA-12504
(4111095552) [17-APR-2019 22:13:40:055] niqme: exit
(4111095552) [17-APR-2019 22:13:40:055] niotns: Couldn't connect, returning 12504
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |