Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: TNS could not resolve the connect identifier

Re: TNS could not resolve the connect identifier

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: 22 Nov 2006 15:54:38 -0800
Message-ID: <1164239678.201847.235450@m7g2000cwm.googlegroups.com>

antonyliu2002_at_yahoo.com wrote:
> I've searched this group before I decided to post this question,
> fearing being humiliated again by the notorious super Oracle DBA from
> the Netherlands whose last name is Bakker. Mr. Bakker, please stop
> right here immediately.

No shortage of grumpy old men that reply to the forum entries around here. ( Leaving my status as unspecified and reserving the right to be a grumpy old man ).

>
> I am not a database person, I do web development with ASP.NET 2.0 for
> IIS.
>
> The backend database for my web application is Oracle 10.1.0.2.0.
>
> This database resides on Machine A.
> The Web server is running on Machine B.
> I am developing the web application on Machine C.
>
> >From within Visual Web Developer 2005 Express on Machine C, I
> successfully configured the database connection. So, from the
> development machine, the web application works great, and the ListBox
> gets populated with data from the Oracle database nicely.
>
> But, if I check out this web application from the web sever on Machine
> B, I get the following error:
>
> <error>
> System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve the
> connect identifier specified.
> </error>
>
> And the following the portion for connectionString in web.config for
> this web application:
>
> <connectionStrings>
> <add name="MyOracleConnectionString"
> connectionString="Provider=MSDAORA.1;Data Source=MyDataSource;Persist
> Security Info=True;Password=MyPassword;User ID=MyUserID"
> providerName="System.Data.OleDb" />
> </connectionStrings>
>
> I can tnsping mydatabase with no problem on both the development
> machine (Machine C) and the productive web server (Machine B). So, I
> guess this issue is probably not related to the TNSNAME setting.
>
> Is it because the same database provider is not installed on the
> productive web server (Machine B)? Would you kindly share your wisdom
> please? Thanks.

Using tnsping is not as good as using a real connection such as via command line sqlplus from both machines. Can you connect into the database from the production web server via dos level utilities?

Your guess about the database provider may be a good one. Many of us here that hang out on cdos don't spend a lot of time with microsoft software ( for various reasons ).

Who is responsible for the support and administration of the production web server? If I were you I would work with them.

It's also possible that there are some firewall related settings that don't allow traffic between the machines on the ports necessary. I have been at places where it takes several months to work through a security audit and change request to allow this kind of traffic. Received on Wed Nov 22 2006 - 17:54:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US