Dear Experts,
For getting the list of sql servers instances on the i am using the below code.
SqlDataSourceEnumerator instance = SqlDataSourceEnumerator.Instance;
public DataTable GetInstances()
{
DataTable dtInstancesList = new DataTable();
dtInstancesList = instance.GetDataSources().Select("", "ServerName ASC").CopyToDataTable();
return dtInstancesList;
}
I am getting the server list, its working fine.
But the problem here is,
In my network we are having two domains like A and B.
1. If i run this code in Domain A:
I am getting full list of SQL server instances.
for example here i am getting count is 100
2. If i run the same code in Domain B:
I am not getting the full list of SQl server instances.
for example here i am getting count is 10
Why this is happening, please let me know the solution.