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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Mar 3, 2023, 10:48 PM
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.
Sachin SinghPosted Mar 3, 2023, 1:53 PM
check this if it helps
https://stackoverflow.com/questions/12178218/asp-net-oracle-issue-tns-could-not-resolve-the-connect-identifier-specified