Contact your Oracle DBA for assistence. Otherwise, you need to enter the correct TNS name if you are using local configuration. See the Oracle support if you are the admin or Google the error for more information.
Try a fully qualified connection string, essentially bypassing tnsnames.ora
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={SERVER_IP_ADDRESS})(PORT={WHAT PORT IS YOUR ORACLE LISTENING ON?}))(CONNECT_DATA=(SERVICE_NAME=t1_exa_abc.domain.com))); User Id={your login name};Password={your login password};
That worked for me, from my local machine it does work adding just the tns name but form the server it needs to be that full datasourse, maybe that is some oracle version
Participant
1443 Points
2030 Posts
ORA-12504: TNS: listener was not given the Service_name in connect_data
Feb 11, 2019 11:58 AM|venkatzeus|LINK
Hi.
I am trying to connect to Oracle Exadata 12 c database from a C# Web application ( VS2010).
I have used the below code
I am getting the error: ORA-12504: TNS: listener was not given the Service_name in connect_data , when the Open connection is called.
The tns entry has the below:
How to fix this?
All-Star
53141 Points
23683 Posts
Re: ORA-12504: TNS: listener was not given the Service_name in connect_data
Feb 11, 2019 03:10 PM|mgebhard|LINK
Contact your Oracle DBA for assistence. Otherwise, you need to enter the correct TNS name if you are using local configuration. See the Oracle support if you are the admin or Google the error for more information.
https://community.oracle.com/thread/609935?start=0&tstart=0
https://stackoverflow.com/questions/29659264/sqlplus-errorora-12504-tnslistener-was-not-given-the-service-name-in-connect
https://github.com/oracle/node-oracledb/issues/641
Contributor
3502 Points
1345 Posts
Re: ORA-12504: TNS: listener was not given the Service_name in connect_data
Feb 13, 2019 01:22 AM|Lannie|LINK
Try a fully qualified connection string, essentially bypassing tnsnames.ora
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={SERVER_IP_ADDRESS})(PORT={WHAT PORT IS YOUR ORACLE LISTENING ON?}))(CONNECT_DATA=(SERVICE_NAME=t1_exa_abc.domain.com)));
User Id={your login name};Password={your login password};
None
0 Points
1 Post
Re: ORA-12504: TNS: listener was not given the Service_name in connect_data
Jun 11, 2020 01:06 PM|douglassimao|LINK
That worked for me, from my local machine it does work adding just the tns name but form the server it needs to be that full datasourse, maybe that is some oracle version