SQL Server 2008 数据库镜像的疯狂
我正在尝试让数据库镜像在两台计算机之间的 SQL Server 2008 上工作。我检查了连接性,但最终得到的结果是:在主机上,服务器可以连接到镜像,但由于“无法连接”而拒绝建立镜像伙伴关系(我检查了连接性,一切正常)。
镜子上发生了奇怪的事情。首先,镜子现在认为它正在被镜像。其次,在我删除并恢复镜像数据库后,它进入正在恢复...模式并卡在那里。
如果您对此有任何想法,我们将不胜感激。谢谢!
I'm trying to get database mirroring to work on SQL Server 2008 between two computers. I checked connectivity, but here's what I end up with: on the principal machine, the server can connect to the mirror but refuses to set up a mirroring partnership due to it being 'unable to connect' (I checked connectivity, everything works).
The weird thing has happened on the mirror. First, the mirror now thinks it's being mirrored. Second, after I delete and recover the mirrored database, it goes into Restoring... mode and just gets stuck there.
Any ideas you might have on this are appreciated. Thanks!
将配置文件附加到两台计算机并监视以下事件:
查看两台计算机的错误日志,以了解在尝试设置镜像会话时跟踪的任何事件。
发生的情况是,当您尝试设置镜像会话时,两台计算机(主体计算机和镜像计算机)将尝试相互打开两个通信通道,并且它们都会相互验证。如果您的networkj连接在任何方向(防火墙,dns,ipsec)上代理,或者Windows身份验证失败(域信任问题),或者SSL身份验证失败(使用证书时,未正确部署)或者SQL授权失败(没有镜像端点上的 CONNECT 权限),其中任何一个都会阻止会话成功,并且您会收到“无法连接”消息。为了找到根本原因,Profiler 是您的朋友。
Attach profiles to both machines and watch for these events:
Look into the ERRORLOG of both machines for any event traced when you attempt to set up the mirroring session.
What happens is that when you attempt to set up the mirroring session both machines (principal and mirror) will attempt to open two communication channels with one another and they both authenticate each other. If your networkj connectivity is broker in any direction (firewall, dns, ipsec) or if the windows authentication fails (domain trust issue) or if the SSL authentication fails (when using certificates, not correctly deployed) or if the SQL authorization fails (no CONNECT permission on the mirroring endpoint), any of these will prevent the session from succeeding and you get the 'unable to connect' message. To find the root cause, Profiler is your friend.