Friday, February 19, 2016

The underlying provider failed to open error in C#

 

This is one of the very common error we use to get while using Oracle database. The error “The underlying provider failed to open” is bit confusing if you are not able to view the inner exception.

Once you get the exception, just expand the exception try to read the inner exception. Whihc will be more clear than this.

I just exapanded the exception and the actual error we get is “ORA – 12154: TNS:could not resolve the conect identifier… ” If you read this exception it will be more clear and you might know what needs to be done.

Below is the screen print of the error.

image

I assume you have installed Oracle client in your machine. This error just because you missed the 3 required files

1. tnsnames.ora

2. sqlnet.ora

3. ldap.ora

So in order to resolve the error “ORA – 12154: TNS:could not resolve the conect identifier…” you have to copy three files to the oracle installation location.

Oracle installation folder may vary depends on where you have installed the software and the windows version.

I have given you two possible location normally oracle get installed.

C:\app\client\<Userid>\product\12.1.0\client_1\network\admin

or

C:\Oracle\product\12.1.0\client_1\Network\Admin

If you cannot find Network and Admin folder in Client_1 path you may create those two folders.

Now you try to run the code and see if the issue gets resolved or not.

I hope it helps you to resolve the issue.

Thanks you for visintg my blog.

19 comments:

Sharad Gupta said...

dot net is the latest technology also provides many features and also easy to learn.you blog also provide descriptive information thank you for sharing

Dot Net Tutorial

Mohana M said...

Hi,Thanks for sharing informative blog. Keep update your blog. Dot Net Training | Mainframe Training

Karthi Swetha said...

These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.our giving articles really impressed for me,because of all information so nice.


Best Java J2ee training institutes in chennai

mythily mythu said...

nice...
Cloud-Computing training in chennai

Jones Sathya said...

Learn Dot Net Training in Chennai at Credo Systemz. Training offered by MNC Experts. Rated as Best .Net Training Institute in Chennai. Learn C# & ASP.Net Course with 100% Placement.

.NET Framework developed by Microsoft is an integral part for most of the primary applications running on Windows. .NET with its consistent and comprehensive programming model, created a technological revolution in recent years. Applications built using .NET has the capability to entice the user with visually stunning experiences along with faultless and secured communication system.

Akshaysri said...

Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
New Zealand Education Consultants in Chennai

Mohana M said...

Hi, you have given really informative post. Thanks for sharing this post to our vision. Learn Hadoop Online Training will helps you to reach your goal.Selenium Online Training

Mohana M said...

Excellent Sharing. You have done great job. I gathered lots of new information. . Devops Online Training | Data Science Online Training

Mohana M said...

Hi, I am really happy to found such a helpful and fascinating post that is written in well manner. Thanks for sharing such an informative post. keep update your blog. R Programming Online Training

Ajay varma said...

Great information . I find site blogs with lots of useful information

Red Hat Linux Training in Chennai

Rekha J said...

Really a good technical site,keep on writing good stuffs
dot net training in chennai

Karthika Shree said...

I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon...
AWS Training in Chennai

Sharaf Mohamed said...

This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.


SEO Company in Chennai
SEO Company in India
Digital Marketing Company in Chennai
Digital Marketing Company in India
Web Development Company in India
Web Design Company in Chennai
Android app development company in Chennai
Mobile App Development Companies in Chennai
Ios app development company in chennai

for IT the said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.

amilu B said...

I am definitely enjoying your website. You definitely have some great insight and great stories. 
python training in annanagar | python training in chennai

python training in marathahalli | python training in btm layout

python training in rajaji nagar | python training in jayanagar

simbu said...

Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.

java training in chennai | java training in bangalore

java online training | java training in pune

java training in chennai | java training in bangalore

java training in tambaram | java training in velachery

shalinipriya said...

Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
Data Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
selenium training in chennai

shri yadav said...

This is quite an educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolite festivity to pity. I appreciated what you ok extremely here.
Python training in marathahalli
Python training in pune
AWS Training in chennai

johnsy sai said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
Devops Training in Chennai
Devops training in sholinganallur