DB2®DataSourceEnumerator.GetDataSources Method
Returns a DataTable with information about all the visible database server instances and databases on those instances.
Overload list
| Name | Description |
|---|---|
| GetDataSources() | Overridden. Returns a DataTable with information about all the visible database server instances and databases on those instances. |
| GetDataSources(Boolean) | Returns a DataTable with information about all the visible database server instances and databases on those instances. A boolean parameter enables the restriction of results to locally cataloged databases. |
| GetDataSources(String Host, String Port, String UID, String PWD) | Enumerates the databases on the instance represented by the Host/Port Note: Host being the
host system the database instance is running on, and port being the port on which the instance
accepts connections.
The instance may be either Db2 or Informix®. When the instance is Db2, the UID and PWD are
ignored. When the instance is Informix the UID and PWD
must represent a user capable of connecting to the Informix instance. |
Remarks
Using the GetDataSources method,
you can find any visible database server instances and databases on
those instances. The GetDataSources method works
through the IBM® Data Server
Provider for .NET and is able to see the following information:
- All databases cataloged on the local instance. In the case where there are multiple local instances, only the instance to which the application is attached will be visible.
- All visible remote database server instances and their databases. In order to be visible, the remote database server instances must have a running database administration server (DAS), which is configured to respond to Search and Known Discovery requests.