SQL Server 2008 数据库镜像的疯狂

发布于 2024-08-29 03:31:20 字数 220 浏览 4 评论 0原文

我正在尝试让数据库镜像在两台计算机之间的 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

素罗衫 2024-09-05 03:31:20
  • 您设置了什么身份验证? Windows 还是证书?
  • 您是否在两台计算机上打开了镜像端点侦听端口?

将配置文件附加到两台计算机并监视以下事件:

查看两台计算机的错误日志,以了解在尝试设置镜像会话时跟踪的任何事件。

发生的情况是,当您尝试设置镜像会话时,两台计算机(主体计算机和镜像计算机)将尝试相互打开两个通信通道,并且它们都会相互验证。如果您的networkj连接在任何方向(防火墙,dns,ipsec)上代理,或者Windows身份验证失败(域信任问题),或者SSL身份验证失败(使用证书时,未正确部署)或者SQL授权失败(没有镜像端点上的 CONNECT 权限),其中任何一个都会阻止会话成功,并且您会收到“无法连接”消息。为了找到根本原因,Profiler 是您的朋友。

  • What authentication did you set up? Windows or certificates?
  • Did you open the mirroring endpoint listening port on both machines?

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.

梦太阳 2024-09-05 03:31:20

恢复是一种允许将额外的备份日志恢复到数据库的状态。您可以使用以下命令从恢复状态切换到在线状态:

RESTORE DATABASE YourDb WITH RECOVERY

Recovering is a state that allows extra backup logs to be restored to the database. You can move from recovering to online with this command:

RESTORE DATABASE YourDb WITH RECOVERY
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文