Hi,
I can get the list of TNS aliases (GetServerList)... BUT:
is there a way to get the content from TNSNAMES.ORA which is associated with a specific TNS-Alias?
Best Regards
Yahia
TNS-Alias / actual content
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: TNS-Alias / actual content
dotConnect for Oracle does not have a feature to get TNS-Alias content. You can get the tnsnames.ora content of desired home and parse it yourself. You can get the content in the following way:
Where you need to replace "Home_name" with the actual name of the desired home. Please also note that OracleConnection.Homes returns only homes of the same bitness as your application.
Code: Select all
OracleHome home = OracleConnection.Homes["Home_name"];
var path = home.Path + @"\network\admin\tnsnames.ora";
String content = File.ReadAllText(path);