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: <antonyliu2002_at_yahoo.com>
Date: 22 Nov 2006 19:58:54 -0800
Message-ID: <1164254334.885066.314590@k70g2000cwa.googlegroups.com>

hpuxrac wrote:
> 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.

Thanks. I just tried connecting to the Oracle 10g database with SqlPlus. I get the same ORA-12154 error on both the development machine and the production machine.

However, as I said, on the development work station, the web application can successfully get the data from this database. It is only when I run the web application on the production server, I get the ORA-12154 error.

And other classic ASP pages on the same production server can get data from the same database with no problem at all. So, the channel between the production web server and the database is good.

I have administrator access to all these servers, and I just installed MDAC like Charles Hooper mentioned, and I also installed ODBC_NET.msi from Microsoft. Neither helped.

Because the connectionString in web.config says:

 connectionString="Provider=MSDAORA.1; blah blah blah

So, I searched both the development machine and the production machine, and both have msdaora.dll under Program Files\Comm Files\System\

Oracle community seems to have an answer here:

http://www.oracle.com/technology/tech/dotnet/col/odt_faq.html#ORA-12154:_TNS:could_not_resolve_the

which does not seem to be true for my case. Received on Wed Nov 22 2006 - 21:58:54 CST

Original text of this message

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