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
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also