SQL Server 浏览器仅显示主机名,不显示实例名称

发布于 2024-07-14 23:25:34 字数 1127 浏览 5 评论 0原文

我刚刚设置了一台带有 SQL Server 2008 Express 实例的新 Windows Server 2008 计算机。 SQL 浏览器服务似乎无法正常工作。 在 Management Studio 中,浏览服务器会显示新服务器的主机名,但不会显示实例名称。 当您从列表中选择主机名时,它不会连接。 但我可以通过键入主机名\实例名组合来手动连接。

更新1:

  1. 浏览器服务正在运行,我已经尝试使用几个不同的帐户,包括域管理员,这是一个不好的做法,但我还是尝试了故障排除的目的。
  2. 我尝试在防火墙上打适当的洞,并完全关闭防火墙。
  3. 它在 Hyper-V、Windows Server 2008 32 位客户机上运行,​​该客户机位于 Windows Server 2008 64 位主机上。 我之前曾在同一台主机上完成过此操作(没有问题),但使用的是 SQL 2008 Standard 而不是 Express。
  4. 当我在 SQL Server 计算机上的 SSMS(Express) 中浏览服务器时,它工作正常并显示整个实例名称。 当我使用 SSMS(标准)在远程计算机(在同一 Intranet 上)上浏览它时,它只显示主机名。

更新2:

按照建议跟踪数据包,发现以下内容

  1. 客户端按预期发送了广播,并从同一网络上的其他SQL Server收到了正确的响应。
  2. 服务器收到广播但没有发送响应。

考虑到这些结果,我想知道为什么主机名首先出现在客户端列表中。 它根本不应该出现,对吧?

更新 3:

花了一个半小时与 Microsoft 支持人员通电话。 我学到了一些东西,但问题还没有解决。 有人建议我尝试在同一台计算机上安装 SQL Standard 实例。 我这样做了,新实例表现出所有相同的症状。 主机名仅在浏览列表中显示一次,而不是每个实例一次。

更新4:

由于赏金系统,Stackoverflow为我选择了一个答案,但这个问题没有得到解答。 今天我尝试将整个虚拟机移动到不同的主机服务器 - 一切都完全相同。 主机名仍显示在浏览列表中,但没有实例名称。

更新 5:

确认来宾 (SQL) 服务器上安装了 Hyper-V 集成服务。

I just setup a new Windows Server 2008 machine with an instance of SQL Server 2008 Express. The SQL Browser service does not appear to be working correctly. In Management Studio, browsing for servers shows the hostname of the new server, but not the instance name. When you choose the hostname form the list it doesn't connect. But I can connect manually by typing the hostname\instancename combination.

update 1:

  1. The browser service is running, and I have tried it with several different accounts, including domain administrator which is a bad practice, but I tried anyway for troubleshooting purposes.
  2. I have tried punching the appropriate holes in the firewall, and also completely turning the firewall off.
  3. This is running on a Hyper-V, Windows Server 2008 32 bit guest, which is on a Windows Server 2008 64-bit host. I have done this before (without issues) on this same host, but with SQL 2008 Standard instead of Express.
  4. When I browse for the server in SSMS(Express) on the SQL Server machine, it works fine and shows the whole instance name. When I browse for it on a remote machine (on the same intranet) with SSMS (standard) it just shows the host name.

update 2:

Followed the packets as suggested and found the following

  1. The client sent the broadcast as expected and received correct responses from other SQL Servers on the same network.
  2. The server received the broadcast but did not send a response.

Considering these results, I wonder why the host name ever appears in the client list in the first place. It shouldn't show up at all, right?

update 3:

Spent an hour and a half on the phone with Microsoft support. I learned a few things, but the problem is not yet solved. It was suggested that I try installing an instance of SQL Standard on the same machine. I did that and the new instance exhibits all the same symptoms. The hostname shows up in the browse list only once, not once for each instance.

update 4:

Stackoverflow chose an answer for me thanks to the bounty system, but this question is not answered. Today I tried moving the whole VM to a different host server - everything is exactly the same. The hostname still appears in the browse list, without the instance name.

update 5:

Confirmed that Hyper-V Integration Services are installed on the guest (SQL) server.

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

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

发布评论

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

评论(5

述情 2024-07-21 23:25:35

我在虚拟机中遇到了同样的问题。 关闭防火墙后就可以了。

I had the same issue in a VM. After shutting down the Firewall it worked.

梦在深巷 2024-07-21 23:25:35

我刚刚遇到了同样的问题。 我无法在 SSMS 网络服务器选项卡中看到实例名称。 事实证明,我已经设置了 Hyper-V 并在本地计算机上创建了内部网络。 该网络被识别为公共/来宾网络,并且已为其启用 Windows 防火墙,即使我的域设置已禁用防火墙。 一旦我在计算机上禁用该访客网络,我就可以看到所有实例。

机器:
物理 SQL Server 2014 Ent
运行 Hyper-V 的 Windows 8.1 笔记本电脑

I just had this same issue. I was not able to see Instance Names in the SSMS Network Servers tab. It turned out that I had set up Hyper-V and created an Internal Network on my local machine. That network was identified as a Public/Guest Network and the Windows Firewall was ENABLED for it, even though my Domain setting has the Firewall DISABLED. Once I disabled that guest network on my computer I could see all the instances.

Machines:
Physical SQL Server 2014 Ent
Windows 8.1 laptop running Hyper-V

云淡月浅 2024-07-21 23:25:34

检查浏览器服务是否正在运行,默认情况下它没有打开。

更新1:查看是否可以安装网络监视器/Wireshark 对 SQL 进行网络跟踪服务器查看是否正在接收广播并发送响应。 我认为这是解决此问题的最佳选择。 根据 MSDN 该服务使用 UDP 端口 1434,所以这是值得关注的流量。

更新2:服务器是否有多个IP? 根据 这篇 MSDN 文章,Windows Server 2008 防火墙存在响应问题即使规则允许数据包通过,SQL 浏览器服务也会进行广播。

check that the browser service is running, it's not turned on by default.

UPDATE1: See if you can install Network Monitor/Wireshark to do a network trace on the SQL Server to see if it's receiving the broadcasts and sending responses. I think this is your best option in troubleshooting this issue. According to MSDN the service uses UDP port 1434, so this is the traffic to watch.

UPDATE2: Does the server have multiple IP's? according to this MSDN article the Windows Server 2008 firewall has issues responding to SQL Browser service broadcasts, even with rules allowing packets through.

人间不值得 2024-07-21 23:25:34

我倾向于不依赖浏览。 您将得到不一致的结果,因为浏览会发送广播 udp/1434 数据包并等待返回响应。 但是,由于您可以通过 SERVERNAME\INSTANCENAME 进行远程连接,因此 SQL Browser 服务的该方面正在正常工作。 如果不是,您将无法连接。 话虽如此,要解决浏览部分的问题:

  • 您是否尝试过停止并重新启动 SQL Browser 服务?
  • 如果不起作用,您是否尝试过停止并重新启动实例?

不幸的是,要彻底解决此问题,您必须进行数据包跟踪。

I tend not to rely on browsing. You'll get inconsistent results because browsing sends out a broadcast udp/1434 packet and waits for responses back. However, since you are able to connect remotely via SERVERNAME\INSTANCENAME, that aspect of the SQL Browser service is working. If it wasn't, you wouldn't have been able to connect. With that said, to troubleshoot the browsing portion:

  • Have you tried stopping and restarting the SQL Browser Service?
  • Have you tried stopping and restarting the instance if that didn't work?

To completely troubleshoot this, unfortunately, you'd have to do packet traces.

所谓喜欢 2024-07-21 23:25:34

听起来浏览服务不知何故搞砸了...

我不知道你是否可以暂时关闭此 SQL Server。 但如果是这样,您可能想尝试以下操作:

  1. 完全卸载所有 SQL\实例。
  2. 运行 SQL Express 2008 安装
  3. 在安装过程中创建默认实例(不是命名实例)
  4. 再次运行安装程序并创建默认命名实例 (SQLExpress)
  5. 尝试再次连接到命名实例。 如果有效,您可以删除默认实例。

Sounds like the browsing service is messed up somehow...

I don't know if you can temporarily take this SQL Server down temporarily. But if so, you may want to try this:

  1. Uninstall all SQL\instances completely.
  2. Run the install of SQL Express 2008
  3. Create a default instance during install (Not a named instance)
  4. Run the installer again and create the default named instance (SQLExpress)
  5. Try connecting to the named instance again. If it works, you can remove the default instance.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文