SQL Server 2014镜像:Principal失败,没有切换到镜像 [英] SQL Server 2014 Mirroring: Principal fails and no switching to mirror

查看:151
本文介绍了SQL Server 2014镜像:Principal失败,没有切换到镜像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1环境:

1 Environment:

校长:Microsoft SQL Server 2014( SP2)(KB3171021) - 12.0.5000.0(X64)

Principal: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64)

镜像:  Microsoft SQL Server 2014(SP2-GDR)(KB3194714) - 12.0.5203​​.0(X64)

Mirror:  Microsoft SQL Server 2014 (SP2-GDR) (KB3194714) - 12.0.5203.0 (X64)

证人:Microsoft SQL Server 2014(SP2-GDR)( KB4019093) - 12.0.5207.0(X64)

Witness: Microsoft SQL Server 2014 (SP2-GDR) (KB4019093) - 12.0.5207.0 (X64)

我们使用域控制器和服务帐户在域中。

We use a domain controller and service accounts are on the domain.

我们还有日志传送到另一个数据库:

We also have log shipping to another database:

日志传送数据库:Microsoft SQL Server 2014(SP2)(KB3171021) - 12.0.5000.0(X64)

Log shipping database: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64)

在所有问题中,所有服务器都已启动并运行。

During all the issue all servers were up and running.

2问题:

2 Problem:

在09:45,主服务器已启动但未回答任何疑问。 角色未在主体和镜像之间切换。

At 09:45 the principal server was up but not answering any queries. The role didn’t switch between the principal and the mirror.

在10:00,日志传送已执行日志备份。

At 10:00 a log backup was performed for log shipping.

在10:01:50我们在日志中遇到第一个错误:

At 10:01:50 we have the first error in the logs:

用户'X'登录失败。原因:在重新验证登录时,无法向日志传送合作伙伴节点发送环境更改通知。

客户端无法重用SPID X的会话,该会话已重置为连接池。失败ID为51.此错误可能是由早期操作
失败引起的。在此错误消息之前立即检查错误日志中的失败操作。

此错误每2 3分钟重复一次。

This error repeated every 2 3 minutes.

在10: 25我们重新启动了托管主体的服务器。它切换到正确响应的镜像。

At 10:25 We restarted the server hosting the principal. It switched to the mirror that responded correctly.

当重新启动结束时,我们手动将角色切换回主体,它没有任何问题。

When the restart was over, we manually switched back the role to principal and it worked with no issues.

当我尝试在问题发生期间恢复在上午10点完成的日志备份时,出现此错误:

When I tried to restore the log backup done at 10AM during the issue, I have this error:

无法重做日志记录(XXXX:XXXX:X),交易ID(X:-XXXXXX),页面(X:XXXXX),分配单位XXXX ,数据库'XDB'(数据库ID X)。页面:LSN =(XXXX:XXXX:X),
分配单位= 72057594061914112,类型= 1.日志:OpCode = 2,上下文2,PrevPageLSN:(XXXX:XXXX:X)。从数据库备份还原,或修复数据库。

3个问题:

3 Questions:

您是否知道在校长未开始回答时,主要实例未切换到镜像的原因?

Do you have an idea why the principal instance didn’t switch to the mirror when the principal started not answering?

推荐答案

未连接到主体的客户端不是故障转移的原因。 

Clients not connecting to the principal is not a cause for failover. 

镜像服务器使用"心跳"检测其他服务器是否正在工作以导致故障转移。  

The mirror servers use a "heartbeat" to detect if the other server is working or not to cause a failover.  

请参阅:

https://docs.microsoft.com/en-us/sql/database-engine/database-mirroring/possible-数据库镜像期间的故障?view = sql-server-2017

至于"客户端无法重用会话SPID",由.Net超时错误引起。 这不是SQL Server上的问题。


这篇关于SQL Server 2014镜像:Principal失败,没有切换到镜像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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