cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
slemieux
Level 4

Testing connection to Oracle

Hi!

I made a .net assembly that I call from my Installscript project. It is supposed to try to connect to an Oracle and SQL Server databases with the user-provided parameters.

With SQL Server, all is fine. However, for Oracle, I get a "TNS: could not resolve service name" error.
I checked my TNSNames.ora file and the server i'm trying to connect to is there.
I tried my connection string with SQLPlus and it worked.
I also called the same .net assembly with a test .net application and all is fine there too.
The .net assembly is OK since i'm able to connect with an SQL Server database through it from InstallShield.

What could be the problem?

Thanks!
Labels (1)
0 Kudos
(4) Replies
hidenori
Level 17

Do you have Oralce Client software installed on your machine? If not, you can get Oracle 10g Instant Client from http://www.oracle.com/technology/tech/oci/instantclient/index.html.

Hope that helps.
0 Kudos
slemieux
Level 4

Yes, I have the standard Oracle client installed, not the Instant Client. If I hadn't my .net test app wouldn't work either.
0 Kudos
slemieux
Level 4

Any idea? :confused:
0 Kudos
hidenori
Level 17

If you are using an Oracle 10g Client software, try an URL string in the format of "//host: [port] [/service name]" instead of a TNS name, and see if it works. The following is an example of what you would type to connect to a specified remote oracle machine:

//sch01jsmithrxp.macrovision.com:1521/ORCL
0 Kudos