Home » RDBMS Server » Networking and Gateways » ORA-12154 (SQL+ works, web page doesn't)
ORA-12154 (SQL+ works, web page doesn't) [message #158753] Tue, 14 February 2006 04:17 Go to next message
mattisimo
Messages: 4
Registered: February 2006
Junior Member
Hi,

I am new to Oracle and am trying to connect to an Oracle 9i database from an ASP.Net web page. I have installed the Oracle client and am using TOAD for db admin type stuff. I can verify that the tnsnames.ora file is valid because I can successfully connect to and query the database using TOAD and SQL+. However, when I try to connect to the database using the Microsoft .Net Oracle data objects I get the ORA-12154 error.

System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve service name.

Any suggestions as to why this may be and how I can resolve it?

Thanks for taking the time to read this.

Matt
Re: ORA-12154 (SQL+ works, web page doesn't) [message #158755 is a reply to message #158753] Tue, 14 February 2006 04:21 Go to previous messageGo to next message
mattisimo
Messages: 4
Registered: February 2006
Junior Member
I forgot to add that I am using the same tnsname.ora file and connection string as a colleague who can successfully connect.

Thanks again,

Matt
Re: ORA-12154 (SQL+ works, web page doesn't) [message #158885 is a reply to message #158755] Tue, 14 February 2006 22:47 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

It seems to be a net service problem.
As you told , you have Oracle client installed on your machine.

Try to connect to the server through Sqlplus using the same service first and if you are not able to connect through sqlplus then post back your tnsnames.ora file.
Re: ORA-12154 (SQL+ works, web page doesn't) [message #158959 is a reply to message #158885] Wed, 15 February 2006 04:13 Go to previous messageGo to next message
mattisimo
Messages: 4
Registered: February 2006
Junior Member
Hi tarunda,

I have successfully connected to the database using the same service in SQL+ and have been able to run queries with no problem.

I can also run TOAD using the same service name which allows me to view tables etc. fine.

Are you aware of any other possible causes?

Thanks for your help,

Matt
Re: ORA-12154 (SQL+ works, web page doesn't) [message #158976 is a reply to message #158959] Wed, 15 February 2006 05:21 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

Sorry! No more guesses .Sad

[Updated on: Wed, 15 February 2006 05:22]

Report message to a moderator

Re: ORA-12154 (SQL+ works, web page doesn't) [message #168686 is a reply to message #158959] Fri, 21 April 2006 11:12 Go to previous messageGo to next message
rranjan
Messages: 3
Registered: April 2006
Location: Edision
Junior Member
Did you get any Clue ??

I have the same problem, when I open the connection through my web service, I have the same error, but on a button click It works fine.

Rakesh Ranjan,
rranjan@chenoainc.com
Re: ORA-12154 (SQL+ works, web page doesn't) [message #197546 is a reply to message #158753] Wed, 11 October 2006 13:11 Go to previous message
chandra_m
Messages: 1
Registered: October 2006
Junior Member
I have the same problem too, while trying to connect to the database from webservice it gives me the exception, if some one got any ideas, let me know.

Thanks

Regards,
Chandra
Previous Topic: ORA-12154: TNS:could not resolve the connect identifier specified
Next Topic: Remove System DSN related to Oracle
Goto Forum:
  


Current Time: Mon Nov 25 09:24:18 CST 2024