473,395 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ORA-12154: TNS:could not resolve service name

Hi,

My connection string in my web application to my oracle database is
working fine when i test it on my machine.. But when i try to run the
application on the web server the error ORA-12154: TNS:could not
resolve service name appears.

Here it is the connection string:
string ConnectionString = @"Provider=msdaora;Data Source=GEST;User
ID=IND;Password=****";

Another thing.. On the web server i can connect with SQLPlus using this
database instance without any problem. It works fine. This error
appears only in the site.

Can anybody help me?

Nov 17 '05 #1
5 8263
are you using System.Data.OracleClient or ODP.Net (if so which version)?
"Bruno Otero" <bs*******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,

My connection string in my web application to my oracle database is
working fine when i test it on my machine.. But when i try to run the
application on the web server the error ORA-12154: TNS:could not
resolve service name appears.

Here it is the connection string:
string ConnectionString = @"Provider=msdaora;Data Source=GEST;User
ID=IND;Password=****";

Another thing.. On the web server i can connect with SQLPlus using this
database instance without any problem. It works fine. This error
appears only in the site.

Can anybody help me?

Nov 17 '05 #2
Ollie, i'm using System.Data.OleDb

Nov 17 '05 #3
Off the top of my head it is failing to find the tnsnames.ora file that
contains the information required to connect to the oracle database. How is
the OleDb connection object meant to find the tnsnames.ora file?

I suggest you download the native driver supplied by Oracle:

http://www.oracle.com/technology/sof...net/index.html

There is an intersting article below, it isn't directly related to your
problem but it shows an alternative way to specify the database ytou wish to
connect to, don't know if this will work with OleDb though.

http://codebetter.com/blogs/sahil.ma.../07/64254.aspx

Also interesting experiences here:

http://www.mcse.ms/archive27-2004-1-247123.html

HTH

Ollie Riches
"Bruno Otero" <bs*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Ollie, i'm using System.Data.OleDb

Nov 17 '05 #4
Some suggestions:

- Logon locally on the server, create a file with extension .udl (OLEDB Data
Link file), open it, select your provider, fill your connection parameters
and click the button "Test Connection". If it succeeds, the problem is your
wep app (a credentials problem, etc.). If it fails, it is something in your
Oracle installation.

- Ensure that you have a TNSNAMES.ORA (or whatever name resolution method)
properly configured.

- Ensure that your C:\Oracle\OraXX\Bin folder in in the PATH variable of
MS-DOS. SQL*Plus does not require this, but everyone else does.

Let us know.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Bruno Otero" <bs*******@gmail.com> escribió en el mensaje
news:11**********************@g49g2000cwa.googlegr oups.com...
Ollie, i'm using System.Data.OleDb

Nov 17 '05 #5
Hello every one.. thanks for your attention and help.

The problem has been solved, the problem was on my configuration on
sqlnet.ora
As soon as i've changed it my web site started to connect to my
database.

Thanks again

Bruno

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ashish Namdeo | last post by:
I get the following error: ORA-00904: invalid column name When I run the following insert command: INSERT INTO XXCUS_VGL_VST_MSTR...
0
by: wqhdebian | last post by:
It was said the ORA-02085 error result from the mismatch of database name and database link name ,and setting glabal_names=false can resolve . but I want to try the other solution,let global_names...
1
by: Doron | last post by:
I'm getting a ORA-00600 error on SYS.EXU8REF (see trace file below). SYS.EXU8REF is a view so the problem should be with one of the underlaying tables. i didnt run oerr12700 yet. can i find the...
0
by: J.Bijleveld | last post by:
Hello colleagues, At this moment we have a real big problem using a .NET application with an Oracle database (v8.1.6). I hope someone has encountered this problem before and is able to help me...
2
by: J.Bijleveld | last post by:
Hello colleagues, At this moment we have a real big problem using a .NET application with an Oracle database (v8.1.6). I hope someone has encountered this problem before and is able to help me...
1
by: jkstexas2001 | last post by:
Could someone be of assistance and show me the problem with the following code? I have researched Metalink regarding ORA-29531, and the most common cause of this error is the failure to declare the...
2
by: Dwie | last post by:
Dear All, I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients. I have some client with 2 different...
4
by: raccoon | last post by:
keep getting an ora-04020: deadlock detected while trying to lock object XDB. XDNDBKDJjilnd The statement I'm trying to issue is: REVOKE execute on abc."descript_T" FROM PUBLIC; I am not...
0
by: s.kapitza | last post by:
Hi, try M$S servicebug 3 regards s.kapitza alghaden@alumni.fdu.edu (Ahmad) wrote in message news:<4a75f4b7.0308080649.49105373@posting.google.com>...
0
by: wolfee | last post by:
I'm running 10gR2 RAC in Prod, Test and DEV and after doing a clone to the DEV environment I'm getting a wierd ORA-12514 error for only one node. I can tnsping the node and it comes back fine. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.