故障转移导致“底层提供程序失败”

发布于 2024-11-29 18:41:52 字数 413 浏览 0 评论 0 原文

我们为 WCF 实现了数据库镜像,并在连接字符串中设置了故障转移伙伴,如下所示

....Data Source=10.0.13.21,1433;Failover Partner=10.0.13.31,1433; ...

10.0.13.21 - primary server
10.0.13.31 - secondary server

,但不知怎的,我们得到了错误:

底层提供者失败

当主服务器处于故障转移状态并且应用程序应该连接到辅助服务器时, 。重置 IIS 后一切恢复正常。 另一个奇怪的事情是,从辅助服务器切换回主服务器可以正常工作,但从主服务器切换到辅助服务器却不起作用。

有人知道这可能的原因吗?

提前致谢

We implemented database mirroring for WCF and set up failover partner in connectionstring as following

....Data Source=10.0.13.21,1433;Failover Partner=10.0.13.31,1433; ...

10.0.13.21 - primary server
10.0.13.31 - secondary server

but somehow we get error:

the underlying provider failed

when the primary server is in failover state and the application is supposed to connect to secondary server. Everything works again after resetting IIS.
Another strange thing is that the switch from secondary back to primary server is working but not from primary to secondary.

Anybody knows possible reason for this?

thanks in advance

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

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

发布评论

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

评论(1

森林散布 2024-12-06 18:41:52

我认为您必须完全关闭应用程序中的连接,并且可能执行一些重试代码。清除连接池可能也是必要的。
另请记住,根据镜像重做队列的大小,故障转移伙伴数据库再次可用之前可能会有延迟。

这是我会阅读的几个链接 http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-(1130)-database-mirroring-failover-is-instantaneous。 aspx

http://technet.microsoft.com/en-us/library/cc917713.aspx

I think you have to completely close your connection in the application and maybe do some retry code. Clearing connection pools may also be necessary.
And also bear in mind that depending upon the size of the redo queues for the mirroring there may be a delay before the failover partner database is available again.

Here's a couple of links which I would read http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-(1130)-database-mirroring-failover-is-instantaneous.aspx

and http://technet.microsoft.com/en-us/library/cc917713.aspx

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