tags:

views:

20

answers:

1

Pardon me if this is a basic question, but I'm just starting to delve into using SQLDMO and I've not been able to find a specific answer to what I'm looking for. The scenario is this:

I am trying to list the running SQL Servers in a combo box, but the problem I'm running into is that they are on a different domain than the one that I am on. So when I compile and run, I'm only seeing the SQL Servers on domain 'ABCD' when I need to see the ones on 'EFGH.' Is there a way to specify the domain that is being looked at? Here's the basic code I'm running now -

        //List all available SQL Servers in the combo box
        SQLDMO.Application SQLApp = new SQLDMO.Application();

        SQLDMO.NameList SQList = SQLApp.ListAvailableSQLServers();

        for (int i = 1; i <= SQList.Count; i++)
        {
            runningServersList.Items.Add(SQList.Item(i));
        }

Again, this may be a basic question, but I'm just starting to get my feet wet using SQLDMO. Thanks for any suggestions!

A: 

This seems like what you're looking for: Inventorying SQL Servers on your network: http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1133155,00.html#

frissony