The server network address "tcp://[server name]:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

我在第一步解决的时候参考网上一些高手的建议:

        1. ping 一下 mirroring server的 5022端口,确定服务打开

        2. 检查两边火墙都关闭

        3. principal server和mirroring server的SQL server 版本都相同。

但是发现我的配置都是正确的,所以进一步打开日志来看错误,Principal服务器上日志正常,而mirror server上的日志发现了错误:

2011-01-30 15:26:08.15 Logon       Database Mirroring login attempt by user 'TAHOE\SQLMONSINGLE1$.' failed with error: 'Connection handshake failed. The login 'TAHOE\SQLMONSINGLE1$' does not have CONNECT permission on the endpoint. State 84.'.  [CLIENT: 10.222.22.55]

看来的账户认证的问题,参考网上一些帖子,终于搞定,解决方法如下:

修改 SQL service的登录帐户为 域帐户,该域帐户具备读写两个数据库的权限(主数据库,镜像库),重启两边的SQL server service,然后重新启动mirroring服务即可。