无法连接数据库镜像见证
我已成功使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我有完全相同的问题。 2 个 Server 2008 64 位盒子,带有 2005 见证人。与原始海报有相同的错误消息。也检查了所有相同的设置,这就是所有谷歌搜索都会指向您的内容。
最后,通过转移到运行 SQL 2008 的见证人来解决这个问题。为此我沮丧了两天。
仅供参考 - 这是 Microsoft 关于见证服务器的声明。我想你可以在其中读到你想要的内容:
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:
您的合作伙伴名称是否与镜像的 FQDN 完全匹配?当镜子(或此事的主体)了解自己时,您描述的行为可能会发生(
GetComputerNameEx
) 的名称与ALTER DATABASE ... SET PARTNER = 'tcp: 中使用的合作伙伴名称不同//合作伙伴名称:...';
.考虑以下场景:Foo
。Foo
通过主机文件解析为镜像的正确 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 theALTER DATABASE ... SET PARTNER = 'tcp://partnername:...';
. Consider this scenario:Foo
for the mirror.Foo
is resolved through the hosts file to the correct IP of the mirrorBar
.Foo
, do you see him?'. The mirror will report to witness 'hello, I'mBar
'. So the witness will report back to the principal 'I don't know whereFoo
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.
根据 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.
我也有同样的问题。我在适配器上禁用了 IP V6,并且能够正常连接到见证服务器。
I had the same problem. I disabled IP V6 on the adapters and was able to connect to witness server OK.