本篇内容介绍了“SQLServer2012镜像主库挂掉怎么切换到镜像备库”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领免费云主机域名大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!故障现象:SQLServer2012镜像环境:主节点1从节点1主节点的主库服务挂了,无法启动。强行启动从库。
在备库执行:
USE master; ALTER DATABASE ec SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS;之后会恢复两分钟,备机的数据库就能用了。数据库日志:
The mirrored database “ec” is changing roles from “MIRROR” to “PRINCIPAL” because the mirroring session or availability group failed over due to FORCE_SERVICE_ALLOW_DATA_LOSS. This is an informational message only. No user action is required.Starting up database ‘ec’.1 transactions rolled forward in database ‘ec’ (7:0). This is an informational message only. No user action is required.0 transactions rolled back in database ‘ec’ (7:0). This is an informational message only. No user action is required.CHECKDB for database ‘ec’ finished without errors on 2016-09-01 15:33:43.907 (local time). This is an informational message only; no user action is required.如果主机恢复了就切回去。–原来的主服务器恢复,可以继续工作,需要重新设定镜像,第一次可能会报个错在备库执行:USE master; ALTER DATABASE ec SET PARTNER RESUME; –恢复镜像 ALTER DATABASE ec SET PARTNER FAILOVER; –切换主备主备切换完成。“SQLServer2012镜像主库挂掉怎么切换到镜像备库”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注百云网站,小编将为大家输出更多高质量的实用文章!
主库1.1 检查错误视图 v$ ARCHIVE_DESTcol dest_name for a30 set line 220 col error for a30 select dest_name,status,error from v$ ARCHIVE_DES…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。