dotConnect for Oracle Documentation
Devart.Data.Oracle Namespace / OracleConnection Class / GetServerList Method / GetServerList() Method
Example

GetServerList() Method
Returns an array of available TNS aliases.
Syntax
'Declaration
 
Public Overloads Shared Function GetServerList() As String()
 

Return Value

An array of available TNS aliases.
Remarks
Use GetServerList() function to read TNS aliases from TNSNAMES.ORA configuration file found in Oracle default home directory.
Example
The following example obtains and then prints list of the servers.
public void DisplayServerList()
{
  string[] serverList = OracleConnection.GetServerList();
  foreach (string server in serverList)
  Console.WriteLine(server);
}
Public Sub DisplayServerList()
  Dim serverList As String() = OracleConnection.GetServerList()
  Dim server As String
  For Each server In  serverList
    Console.WriteLine(server)
  Next server
End Sub 'DisplayServerList
See Also