SQL Server 中的跨数据库视图和镜像

发布于 2024-07-25 11:01:34 字数 248 浏览 2 评论 0原文

我有一个关于镜像和跨数据库视图的问题。 我们在数据库 X 中有一个视图,它引用同一服务器 S1 上的数据库 Y。 数据库 X & Y 都镜像到另一台服务器 S2 上。 问题是:如果 db X 故障转移到 S2,则引用 db Y 的视图现在正在 S2 上查找,但 db Y 可能尚未故障转移。 解决这个问题的最佳方法是什么? 您能否创建一对镜像对,以便如果这对数据库中的 1 个数据库发生故障转移,另一个也会发生故障?

谢谢

I have a question about mirroring and cross-db views.
We have a view in database X which references database Y on the same server S1.
The databases X & Y are both mirrored onto another server S2.
The problem is: if db X fails over to S2, the view which references db Y is now looking on S2, but db Y may not have failed over.
What is the best way around this? Can you create a mirrored couple, so that if 1 on the dbs in the couple fails over, the other one does too?

Thanks

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

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

发布评论

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

评论(2

柳絮泡泡 2024-08-01 11:01:34

我们检测到数据库出现故障,并手动故障转移第二个数据库。 这篇文章可能会有所帮助; 基本上,它是对见证中第一个数据库的故障转移的黑客攻击,可以让您触发第二个数据库的故障转移。

http://www.mssqltips.com/tip.asp?tip=1564

We detect that the database has failed and manually failover the second database. This article will likely help; basically it is a hack on the failover of the first database in the witness that lets you trigger a failover of the second database.

http://www.mssqltips.com/tip.asp?tip=1564

温柔嚣张 2024-08-01 11:01:34

如果升级到 SQL 2012,您可以使用 Always on Availability Groups 功能对数据库进行分组以达到此目的。

If you upgrade to SQL 2012 you can use the Always on Availability Groups function to group databases for this very purpose.

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