执行手动故障转移(无见证,高保护模式)

发布于 2024-07-12 03:10:28 字数 793 浏览 9 评论 0原文

如果主伙伴和镜像伙伴都可用,我可以执行故障转移,但是当主体关闭或从网络上拔下(即失败)时,我无法弄清楚如何执行手动故障转移。

我尝试使用:

ALTER DATABASE myMirrorDatabase SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

但这会使数据库进入以下状态:

[In Recovery]

我无法运行RESTORE DATABASE,因为数据库已配置为镜像。 那么这样做的正确方法是什么? 帮助!


更多信息...(给定 SERVER_ADB_A 以及 SERVER_BDB_B

初始状态:

DB_A is [Principal, Synchronised], DB_B is [Mirror, Synchronised / Restoring]

我停止 SERVER_A

DB_A is [offline], DB_B is [Mirror, Disconnected / In Recovery]

我运行上面的alter数据库语句:

DB_A is [offline], DB_B is [In Recovery] 

I can execute a fail-over if both the primary and the mirror partners are available, but I can't figure out how to do a manual fail-over when the principal is switched off or unplugged from the network (i.e. fails).

I tried using:

ALTER DATABASE myMirrorDatabase SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

But this puts the db into the following state:

[In Recovery]

I can't run RESTORE DATABASE, because the db is configured for mirroring. So what is the proper way of doing this? Help!


Further info... (given SERVER_A with DB_A and SERVER_B with DB_B)

Initial State:

DB_A is [Principal, Synchronised], DB_B is [Mirror, Synchronised / Restoring]

I stop SERVER_A:

DB_A is [offline], DB_B is [Mirror, Disconnected / In Recovery]

I run the alter database statement above:

DB_A is [offline], DB_B is [In Recovery] 

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

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

发布评论

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

评论(1

秋意浓 2024-07-19 03:10:28

如果发生计划外故障转移且主体和见证人不可用,则应在镜像上发出以下语句:

USE master
go
ALTER DATABASE AdventureWorks SET PARTNER OFF
GO
RESTORE DATABASE AdventureWorks WITH RECOVERY
GO

这将使镜像联机。

如果主体再次可用后需要重新建立镜像配置,则需要执行备份镜像数据库(因为它现在是最新版本)、恢复到主体,然后重新配置镜像的过程但相反。 最终,镜子将成为新的校长。

If you have an unplanned failover where the principal and witness aren't available you should issue the following statements on the mirror:

USE master
go
ALTER DATABASE AdventureWorks SET PARTNER OFF
GO
RESTORE DATABASE AdventureWorks WITH RECOVERY
GO

This will bring the mirror online.

If you need to re-establish the Mirror configuration once the principal is available again you need to go through the process of backing up the mirror DB (because it's now the most recent version), restoring to the principal and then configuring mirroring all over again but in reverse. At the end of it the mirror will become the new principal.

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