TNS Names and multiple homes

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 64
Joined: Wed 04 Jan 2006 15:32

TNS Names and multiple homes

Post by kevinherring » Wed 25 Jan 2006 15:14

This is kind of a double question:
Firstly, I want to be able to list all of the TNS names in an oracle home. How do I do this?

I have 2 oracle homes, How do I list them? and how do I select a particular one to connect with? I have tried the object, but although it gets the count correct, if I iterate through them, they are all 'nothing'.

I am using version 3.01.


Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 26 Jan 2006 12:07

We cannot reproduce your problem. Do you have Oracle client installed on your computer? Can you see Oracle homes in Info tab of "OracleConnection Editor" dialog?
Please try the following code for enumerating homes.

Code: Select all

      OracleHomeCollection hh = OracleConnection.Homes;
      foreach(OracleHome h in hh) {
        string s = h.Name;
Please use OracleConnection.GetServerList for receiving all TNS names in Oracle home. See OraDirect .NET documentation for more details.

Post Reply