执行手动故障转移(无见证,高保护模式)
如果主伙伴和镜像伙伴都可用,我可以执行故障转移,但是当主体关闭或从网络上拔下(即失败)时,我无法弄清楚如何执行手动故障转移。
我尝试使用:
ALTER DATABASE myMirrorDatabase SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS
但这会使数据库进入以下状态:
[In Recovery]
我无法运行RESTORE DATABASE
,因为数据库已配置为镜像。 那么这样做的正确方法是什么? 帮助!
更多信息...(给定 SERVER_A
和 DB_A
以及 SERVER_B
和 DB_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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果发生计划外故障转移且主体和见证人不可用,则应在镜像上发出以下语句:
这将使镜像联机。
如果主体再次可用后需要重新建立镜像配置,则需要执行备份镜像数据库(因为它现在是最新版本)、恢复到主体,然后重新配置镜像的过程但相反。 最终,镜子将成为新的校长。
If you have an unplanned failover where the principal and witness aren't available you should issue the following statements on the mirror:
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.