开发者

Can't get database mirror witness to connect

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 开发者_如何学CSQL Profiler and then these errors.

Does anyone know why is this happening?


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."


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜