ORA-12154 (SQL+ works, web page doesn't) [message #158753] |
Tue, 14 February 2006 04:17 |
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 #158885 is a reply to message #158755] |
Tue, 14 February 2006 22:47 |
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 |
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
|
|
|
|
|
|