I am trying to connect to oracle sql developer through .net application but getting this error
ORA-12154: TNS:could not resolve the connect identifier specified
Please let me know how can this issue be resolved
I am trying to connect to oracle sql developer through .net application but getting this error
ORA-12154: TNS:could not resolve the connect identifier specified
Please let me know how can this issue be resolved
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Mar 3, 2023, 8:53 AM EST
check this if it helps
https://stackoverflow.com/questions/12178218/asp-net-oracle-issue-tns-could-not-resolve-the-connect-identifier-specified
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 3, 2023, 5:48 PM EST
Hello Aniket,
The ORA-12154 error usually occurs when Oracle cannot find the database connection information specified in the connection string.
Try the following steps:
1. Check that the connection string you are using is correct and that the database name, hostname, port number, and service name are all correct.
2. Check the TNS Names file is a configuration file that contains the database connection information. Ensure that the TNS Names file contains the correct database connection information.
3. Verify that the Oracle database is up and running and that you have the correct permissions to access the database.
4. Check that the firewall is not blocking the connection between your .NET application and the Oracle database.
5. If you are using Oracle 10g or later, you can use the EZCONNECT syntax in the connection string to bypass the TNS Names file. For example: "Data Source=//hostname:port/service_name".
6. If you are not sure about the connection string syntax, you can use the Oracle connection string builder to create a valid connection string. You can find it under the "Tools" menu in Visual Studio.