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:
我已经使用SQL Server 2008和Windows Server 2008 R2 64bit成功配置了主体和镜像。但是,当我尝试添加见证(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'."
I can see a temporary established connection on port 5022 via netstat and SQL Profiler and then these errors.
我可以通过netstat和SQL Profiler在端口5022上看到临时建立的连接,然后是这些错误。
Does anyone know why is this happening?
有谁知道为什么会这样?
4 个解决方案
#1
2
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.
我有完全相同的问题。 2 Server 2008 64位盒,带有2005年见证。与原始海报有相同的错误消息。检查了所有相同的设置,这是所有的谷歌搜索将指向你。
In the end, it was fixed by moving to a witness running SQL 2008. Two days of frustration over that one.
最后,通过转移到运行SQL 2008的证人来解决这个问题。对那个问题感到沮丧两天。
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."
我们强烈建议证人与合作伙伴共用一台计算机。数据库镜像合作伙伴仅受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的硬件和软件要求。“
#2
1
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:
您的合作伙伴名称是否与镜像的FQDN完全匹配?当镜像(或事物的主体)通过与ALTER DATABASE中使用的伙伴名称不同的名称知道自己(GetComputerNameEx的返回)时,您描述的行为可能发生... SET PARTNER ='tcp:// partnername: ......';.考虑这种情况:
- 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'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.
校长使用名称Foo作为镜像。 Foo通过hosts文件解析为镜像的正确IP
镜子知道自己是酒吧。
当一名证人被加入时,校长会说“Foo的状态是什么,你看到他了吗?”。镜子会报告'你好,我是吧'。因此,证人将向校长报告“我不知道Foo在哪里”,这最终会打破镜像会话。
There are more details and nuances. The gist of the story is: always use FQDN names properly resolved through DNS when setting up mirroring.
有更多的细节和细微差别。故事的要点是:在设置镜像时,始终使用通过DNS正确解析的FQDN名称。
#3
1
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.
根据Microsoft SQL Server 2008 Bible,原则,镜像和见证服务器都必须具有相同的SQL Server版本(2005年与2008年)。原则和镜像也必须具有该版本的相同版本(Enterprise vs. Standard)。因此,证人可以是任何版本(express,std,ent,workgroup ...),但也必须是同一版本。
#4
0
I had the same problem. I disabled IP V6 on the adapters and was able to connect to witness server OK.
我有同样的问题。我在适配器上禁用了IP V6,并且能够连接到见证服务器。
#1
2
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.
我有完全相同的问题。 2 Server 2008 64位盒,带有2005年见证。与原始海报有相同的错误消息。检查了所有相同的设置,这是所有的谷歌搜索将指向你。
In the end, it was fixed by moving to a witness running SQL 2008. Two days of frustration over that one.
最后,通过转移到运行SQL 2008的证人来解决这个问题。对那个问题感到沮丧两天。
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."
我们强烈建议证人与合作伙伴共用一台计算机。数据库镜像合作伙伴仅受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的硬件和软件要求。“
#2
1
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:
您的合作伙伴名称是否与镜像的FQDN完全匹配?当镜像(或事物的主体)通过与ALTER DATABASE中使用的伙伴名称不同的名称知道自己(GetComputerNameEx的返回)时,您描述的行为可能发生... SET PARTNER ='tcp:// partnername: ......';.考虑这种情况:
- 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'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.
校长使用名称Foo作为镜像。 Foo通过hosts文件解析为镜像的正确IP
镜子知道自己是酒吧。
当一名证人被加入时,校长会说“Foo的状态是什么,你看到他了吗?”。镜子会报告'你好,我是吧'。因此,证人将向校长报告“我不知道Foo在哪里”,这最终会打破镜像会话。
There are more details and nuances. The gist of the story is: always use FQDN names properly resolved through DNS when setting up mirroring.
有更多的细节和细微差别。故事的要点是:在设置镜像时,始终使用通过DNS正确解析的FQDN名称。
#3
1
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.
根据Microsoft SQL Server 2008 Bible,原则,镜像和见证服务器都必须具有相同的SQL Server版本(2005年与2008年)。原则和镜像也必须具有该版本的相同版本(Enterprise vs. Standard)。因此,证人可以是任何版本(express,std,ent,workgroup ...),但也必须是同一版本。
#4
0
I had the same problem. I disabled IP V6 on the adapters and was able to connect to witness server OK.
我有同样的问题。我在适配器上禁用了IP V6,并且能够连接到见证服务器。