无法连接数据库镜像见证

发布于 2024-09-24 02:11:00 字数 740 浏览 1 评论 0原文

我已成功使用 SQL Server 2008 和 Windows Server 2008 R2 64 位配置主体和镜像。但是,当我尝试将见证服务器(SQL Server 2005 和 Windows Server 2003 32 位) 添加到混合服务器中时,我在主服务器的事件日志中收到以下错误:

 EventID 1456 "The ALTER DATABASE command could not be sent to the remote 
     server instance 'TCP://SERVERNAME.DOMAIN:5022'. The database mirroring 
     configuration was not changed. Verify that the server is connected,
     and try again." and EventID 1474 "Database mirroring connection error 
      4 'An error occurred while receiving data: '64(The specified network name is 
      no longer available.)'.' for 'TCP://SERVERNAME.DOMAIN:5022'."

我可以看到临时建立的连接通过 netstat 和 SQL Profiler 在端口 5022 上查看,然后出现这些错误。

有谁知道为什么会发生这种情况?

I have successfully configured a principal and mirror with SQL Server 2008 and Windows Server 2008 R2 64bit. However, when I attempt to add a witness (SQL Server 2005 and Windows Server 2003 32bit) to the mix, I get the following errors in the event log of the primary:

 EventID 1456 "The ALTER DATABASE command could not be sent to the remote 
     server instance 'TCP://SERVERNAME.DOMAIN:5022'. The database mirroring 
     configuration was not changed. Verify that the server is connected,
     and try again." and EventID 1474 "Database mirroring connection error 
      4 'An error occurred while receiving data: '64(The specified network name is 
      no longer available.)'.' for 'TCP://SERVERNAME.DOMAIN:5022'."

I can see a temporary established connection on port 5022 via netstat and SQL Profiler and then these errors.

Does anyone know why is this happening?

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

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

发布评论

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

评论(4

风轻花落早 2024-10-01 02:11:00

我有完全相同的问题。 2 个 Server 2008 64 位盒子,带有 2005 见证人。与原始海报有相同的错误消息。也检查了所有相同的设置,这就是所有谷歌搜索都会指向您的内容。

最后,通过转移到运行 SQL 2008 的见证人来解决这个问题。为此我沮丧了两天。

仅供参考 - 这是 Microsoft 关于见证服务器的声明。我想你可以在其中读到你想要的内容:

软件和硬件建议

我们强烈建议见证人与合作伙伴驻留在不同的计算机上。仅 SQL Server 2005 Standard 和更高版本以及 SQL Server 2005 Enterprise Edition 和更高版本支持数据库镜像伙伴。相比之下,SQL Server 2005 Workgroup 及更高版本以及 SQL Server 2005 Express Edition 及更高版本也支持见证。见证服务器可以在支持任何这些 SQL Server 版本的任何可靠计算机系统上运行。但是,我们建议用作见证服务器的每个服务器实例都符合您正在运行的 SQL Server Standard 版本所需的最低配置。有关这些要求的详细信息,请参阅安装 SQL Server 2008 R2 的硬件和软件要求。”

I had exactly the same problem. 2 Server 2008 64 bit boxes, with a 2005 witness. Had the same error message as the original poster. Checked all the same settings too, which is what all the googling will point you towards.

In the end, it was fixed by moving to a witness running SQL 2008. Two days of frustration over that one.

FYI - this is what Microsoft states regarding the Witness server. I guess you can read what you want to into it:

Software and Hardware Recommendations

We strongly recommend that the witness reside on a separate computer from the partners. Database mirroring partners are supported only by SQL Server 2005 Standard and later versions and by SQL Server 2005 Enterprise Edition and later versions. Witnesses, in contrast, are also supported by SQL Server 2005 Workgroup and later versions and by SQL Server 2005 Express Edition and later versions. A witness can run on any reliable computer system that supports any of these editions of SQL Server. However, we recommend that every server instance that is used as a witness correspond to the minimum configuration that is required for the SQL Server Standard version that you are running. For more information about these requirements, see Hardware and Software Requirements for Installing SQL Server 2008 R2."

一场春暖 2024-10-01 02:11:00

您的合作伙伴名称是否与镜像的 FQDN 完全匹配?当镜子(或此事的主体)了解自己时,您描述的行为可能会发生(GetComputerNameEx) 的名称与 ALTER DATABASE ... SET PARTNER = 'tcp: 中使用的合作伙伴名称不同//合作伙伴名称:...';.考虑以下场景:

  • 主体使用镜像名称 FooFoo 通过主机文件解析为镜像的正确 IP,
  • 镜像知道自己为 Bar
  • 当添加见证人时,委托人将询问“Foo 的状态如何,你看到他了吗?”。镜子将向目击者报告“你好,我是Bar”。因此,见证人将向委托人报告“我不知道 Foo 在哪里”,这最终可能会破坏镜像会话。

还有更多细节和细微差别。故事的要点是:在设置镜像时,始终使用通过 DNS 正确解析的 FQDN 名称。

Does your partner name match exactly the FQDN of the mirror? The behavior you describe can happen when the mirror (or principal for the matter) knows himself (the return of GetComputerNameEx)by a different name than the name used partner in the ALTER DATABASE ... SET PARTNER = 'tcp://partnername:...';. Consider this scenario:

  • the principal uses the name Foo for the mirror. Foo is resolved through the hosts file to the correct IP of the mirror
  • the mirror knows himself as Bar.
  • when a witness is added the principal will as 'what is the status of Foo, do you see him?'. The mirror will report to witness 'hello, I'm Bar'. So the witness will report back to the principal 'I don't know where Foo is' and this can end up breaking the mirroring session.

There are more details and nuances. The gist of the story is: always use FQDN names properly resolved through DNS when setting up mirroring.

不乱于心 2024-10-01 02:11:00

根据 Microsoft SQL Server 2008 Bible,原则服务器、镜像服务器和见证服务器都必须具有相同版本的 SQL Server(2005 与 2008)。原理和镜像也必须具有与该版本相同的VERSION(企业版与标准版)。因此,见证人可以是任何版本(express、std、ent、workgroup...),但也必须是同一版本。

According to the Microsoft SQL Server 2008 Bible, the principle, mirror AND witness servers all must have the same EDITION of SQL Server (2005 vs. 2008). The principle and mirror must also have the same VERSION of that edition (Enterprise vs. Standard). So, the witness can be any version (express, std, ent, workgroup...), but must also be the same Edition.

黑凤梨 2024-10-01 02:11:00

我也有同样的问题。我在适配器上禁用了 IP V6,并且能够正常连接到见证服务器。

I had the same problem. I disabled IP V6 on the adapters and was able to connect to witness server OK.

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