Retrieves a list of all existing Touchstone® SQL
Data Sources that are registered with the Touchstone application.
A Data Source is a SQL Exposure or Results database.
Use the GetDataSources()
method to find out the name and Touchstone-generated Data Source Sequential Identifier (SID) of each Data Source that is registered with the Touchstone application.
Parameters
- request
- Contains a GetDataSourcesRequest that identifies the Business Unit SID and SQL Instance SID associated with the list of Data Sources that you want to retrieve.
Return Value
A
GetDataSourcesResponse containing a
list of Data Sources that are registered with the Touchstone application.
The following example shows how to retrieve a list of all Touchstone Data Sources that are registered with the Touchstone application using the
GetDataSources()
method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.DataSourceManagement.Api;
using AIR.Services.DataSourceManagement.Data;
class SnippetGetDataSourcesRequest
{
private static void GetDataSources(int businessUnitSid, int sqlInstanceSid, string dataServerName)
{
DataSourceManagementServiceClient dsClient = new DataSourceManagementServiceClient();
GetDataSourcesRequest request = new GetDataSourcesRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
request.DataServerName = dataServerName;
GetDataSourcesResponse response = dsClient.GetDataSources(request);
if (response.Status.Code == StatusCode.Success)
{
foreach (DataSource ds in response.DataSources)
{
Console.WriteLine("SID: " + ds.Sid);
Console.WriteLine("Name: " + ds.Name);
Console.WriteLine("Description: " + ds.Description);
Console.WriteLine("Registered: " + ds.Registered.ToString());
Console.WriteLine("Type: " + ds.Type);
}
}
}
}
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