TNS Names and multiple homes

TNS Names and multiple homes

Postby 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?

Secondly:
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 connection.homes object, but although it gets the count correct, if I iterate through them, they are all 'nothing'.

I am using version 3.01.

Thanks.
kevinherring
 
Posts: 64
Joined: Wed 04 Jan 2006 15:32

Postby 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;
        GC.KeepAlive(s);
      }


Please use OracleConnection.GetServerList for receiving all TNS names in Oracle home. See OraDirect .NET documentation for more details.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for Oracle