手动故障转移后,只读数据库 [英] Database is read only after manual failover

查看:97
本文介绍了手动故障转移后,只读数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hello Guys.I有一个SharePoint 2013 Farm,数据库托管在远程SQL服务器上,并且配置了针对HA的alwayson。 

Hello Guys.I have a SharePoint 2013 Farm and databases are hosted on remote SQL servers with alwayson configure for HA. 


当我手动从主服务器故障转移到辅助服务器时,SharePoint网站将转换为只读模式。此消息显示("We $" b $ b对由此给您带来的任何不便表示歉意,但我们在网站上进行了一些改进后才对网站进行了宣读。"


When我尝试为SharePoint运行ClearMaintenanceMode powershell,它返回错误并指定内容数据库处于只读模式。

When i try to run the ClearMaintenanceMode powershell for SharePoint, it returns error and specify that a content database is in Read only mode.


异常调用" ; ClearMaintenanceMode" with" 0" argument(s):"&fbsp;  update
database" DatabaseName"因为数据库是只读的。"


当我检查数据库状态时SQL Management Studio(数据库属性>选项>状态>数据库只读),我发现它是假的 

When i check the database state in SQL Management Studio (Database Properties> Options> State> Database Read-Only), i found it is False 



有什么想法吗?

Any ideas?


谢谢

推荐答案

Magid,

在我看来,由于故障转移,用户连接到副本数据库,而不是主数据库。这就是数据库说它是只读的原因。出现错误是因为
无法在sql server中写入辅助副本。只有主副本可以托管读写数据库,而可用性组只能有一个主副本。

It appears to me that due to the failover, the users were connected to the replica database, not the primary. This is why the database said it was read-only. The error occurs because writing to secondary replicas in sql server is not possible. Only primary replica can host read-write databases, and an availability group can only have one single primary replica.

您可以尝试以下解决方案:

Here are some solutions you can try:

https://stackoverflow.com/questio ns / 45586105 / database-is-read-only-secondary-secondary-replica-of-alwayson-groups

https://blog.greglow.com/2017/08 / 12 /无法更新数据库 - 因为数据库是只读/

随时回复任何更新。

最好的问候

Jerry Xu


这篇关于手动故障转移后,只读数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆