简体   繁体   English

使用SQLDMO列出SQL服务器时,是否可以指定要查看的域?

[英]Is there a way to specify a domain to look at when using SQLDMO to list SQL servers?

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. 如果这是一个基本问题,请原谅我,但是我只是开始深入研究使用SQLDMO,但我无法找到我要寻找的特定答案。 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. 我试图在组合框中列出正在运行的SQL Server,但是我遇到的问题是它们与我所在的域不在同一个域中。 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.' 因此,当我编译运行时,仅在需要查看“ EFGH”上的SQL Server时,才看到“ ABCD”域上的SQL Server。 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. 再次,这可能是一个基本问题,但是我刚刚开始使用SQLDMO弄湿自己的脚。 Thanks for any suggestions! 感谢您的任何建议!

这似乎是您要寻找的内容:盘点网络上的SQL Server: http : //searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1133155,00.html#

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM