如果 sqlexpress 位于安装 SQLSERVER2008 的同一台计算机上,SmoApplication.EnumAvailableSqlServers() 不会列出默认实例

发布于 2024-07-27 12:15:46 字数 449 浏览 3 评论 0原文

我正在使用 SMO 查找网络的可用 sqlserver。但是在我运行

应用程序的一台计算机中,它不会提供默认实例名称,但对于所有其他计算机,它

会显示指定的实例和默认实例。

观察我的场景。

的应用程序的本地机器

例如:机器名称:rkwrk3-vm-sr(我运行安装了sqlserver2008

)实际上我有sql2008作为默认实例,sqlexpress(2005)作为命名实例...

但它只显示一个实例rkwrk3-vm-sr\sqlexpress 并且它不支持 rkwrk3-vm-sr。

和其他一些机器 Hr-2k3-tm(安装了 sqlserver2005)

为此显示 Hr-2k3-tm 和 Hr-2k3-tm/sqlexpress

我如何解决此问题。非常感谢任何帮助。

提前致谢。

I am using SMO to find available sqlservers of a network.But in one machine where i running

application it doesnot give Default instance name but for all other machines it gives the

named and default instance wil be showing.

Observe my Scenario.

Ex: Machine Name :rkwrk3-vm-sr (local machine from where i am running app in which

sqlserver2008 installed)

in this actually i have sql2008 as default instance and sqlexpress(2005) as named instance...

But it shows only one instance rkwrk3-vm-sr\sqlexpress and it doesnot ahows rkwrk3-vm-sr.

and some other machines Hr-2k3-tm(where sqlserver2005 installed)

for this it is showing Hr-2k3-tm and Hr-2k3-tm/sqlexpress

How can i fix this .Any Help wil Greately Appreciated.

Thanks in Advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

世俗缘 2024-08-03 12:15:46

实例发现协议(1434 上的 UDP)由 SQL Browser 服务< /a>,默认情况下被禁用(为了纪念名为 Slammer 的东西...)。

确保该服务已在所有计算机上启用并启动。

The instance discovery protocol (the UDP on 1434) is served by the SQL Browser service, which by default is disabled (in memory of a thing named Slammer...).

Make sure the service is enabled and started on all machines.

小嗲 2024-08-03 12:15:46

使用替代方法获取服务器列表可能会有更好的运气。 也许 Microsoft 推荐使用 System.Data.Sql.SqlDataSourceEnumerator.Instance

枚举 SQL Server 实例
http://msdn.microsoft.com/en-us/library/a6t1z9x2。 aspx

或此方法:

使用 ODBC 在 C# 中枚举 SQL Server 实例
http://www.codeproject.com/KB/database/SubmitSQLInfoEnumerator.aspx

You might have better luck using an alternate method to get the server list. Perhaps this method recommended by Microsoft that uses the System.Data.Sql.SqlDataSourceEnumerator.Instance

Enumerating Instances of SQL Server
http://msdn.microsoft.com/en-us/library/a6t1z9x2.aspx

Or this method:

Enumerate SQL Server Instances in C#, Using ODBC
http://www.codeproject.com/KB/database/SubmitSQLInfoEnumerator.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文