Hi guys,
If you are trying to connect to an Oracle Database, through Server Explorer in Visual Studio, you have to ensure that:
1. You have installed the Oracle Data Provider (downloadable from the Oracle Website)
2. Have created the tnsnames.ora file, holding information about the databases (http://www.orafaq.com/wiki/Tnsnames.ora). This file should be created most often in the Network\Admin folder under the Oracle Provider. In my case: C:\app\user\product\11.2.0\client_1\Network\Admin
After having these prerequisites, I still couldn't connect to the Oracle Database. The Visual Studio wizard told me: "ORA-12154: TNS:could not resolve the connect identifier specified". What resolved this issue for me was to add the Environment Variable with name "TNS_ADMIN" and value the Path to the directory containing the "tnsnames.ora" file.
Something like:
TNS_NAMES="C:\app\user\product\11.2.0\client_1\Network\Admin"
Then just restart Visual Studio and you're free to go.
Hope this helps someone out there :)
16 comments:
Has the same issue as you and this blog post helped me resolve my issue.
Thanks .........
this helped me a lot. i love you man.
will u please explain me further clear.. am using oracle 10g express edition.. i am facing this problem for a week.. pls help me..
Hi kannan
Can u plz share oracle database 10g . bcoz we r unable to find it on Oracle site.
You are the man! It worked pretty easy.
how can i add enviorment variable ??
kindly tell me please
Hi, please take a look here:
http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/
There is a step-by-step guide with screenshots.
Best,
Yosif
Yosif...YO man .THANK YOU
You same hell of time, I was breaking my dead, I did added environment variables, but not restarted VS2010
After reading your blog, I restarted VS, it started working..thanks
I spent hours Binging/Googling on this topic. Yosif, You're the man!
ya da man yosif, btw do you know how to add TNS_NAMES variable in visual studio installer?
Thank you!
Thank you!
Yosif - BIG THANK YOU!!! I spent literally days trying to figure this out - I pulled my hair so much that I lost half of my hair :) Damn oracle, add this in your manual.
MAAAANN !!!! you totally save my life !!!!
thank you so much :D
many blessings upon you good sir
Post a Comment