Thursday, November 23, 2023

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

I had a situation where the error
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
was thrown when connecting to a PDB.

The PDB was up and the listener runnning and serving the service_name which I wanted to connect to:

Solution was to reverse the order of directory_path in sqlnet.ora from
NAMES.DIRECTORY_PATH= (EZCONNECT,TNSNAMES)
to
NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT )

No comments:

Post a Comment