ASP.NET: Error: ora-12154: TNS:could not resolve service name
If your getting the following error in ASP.NET Crystal Report or Tnsping
ora-12154: TNS:could not resolve service name
Here's a possible solution.
Posted by LazyAssCoder
on Nov 26, 2008
2139 Views
Report Abuse
Tags: ASP.NET Crystal Report, Crystal Report, BOE, TNSPING, tnsnames.ora
When you use SQL Developer or Toad, you're able to connect to your Oracle server, but when you try to run a Crystal Report or use TNSPING against your oracle server and you get the following error:
ora-12154: TNS:could not resolve service name
It's possible that your application can not file the tnsnames.ora file. Make sure that this file exists in the following directory: C:\Ora920\network\admin (NOTE: This path could be different on your machine)
Check your Windows environment variables paths and see if C:\Ora920\network\admin is part of the path. To check your environment variables on Windows XP, follow the following steps:
- Click Start > Control Panel > System
- Click on the Advance tab > Environment Variables
- Under the System Variables section, look for and select the variable named: Path
- Click on the Edit button and look for the tnsnames.ora file path
- If it doesn't exist, add it in and reboot your machine
Hopefully this will solve the ora-12154: TNS:could not resolve service name problem