手动将 SQL 实例移动到另一个节点会导致立即数据库镜像故障转移

pau*_*ulH 5 sql-server clustering mirroring sql-server-2008-r2

我有一个双节点 SQL 集群 (2008 R2)。

该 SQL 实例中的一些数据库被镜像到远程站点上的另一台服务器,使用具有自动故障转移的高安全性。这些数据库的镜像连接超时值设置为 90 秒。

当我将 SQL 从集群中的一个节点移动到另一个节点时,使用故障转移集群管理器应用程序的“将此服务或应用程序移动到另一个节点”选项,被镜像的数据库会立即故障转移到镜像。

这是不受欢迎的行为。我设置镜像连接超时值的原因是我只想在集群完全失败并且没有运行节点的情况下故障转移到数据库镜像。

有没有办法实现这一目标?感觉好像应该是可能的,否则混合集群和自动故障转移数据库镜像的概念将是行不通的,因为集群内的每个节点故障转移都会触发镜像故障转移。

谢谢。

Han*_*non 5

防止镜像故障转移的一种方法是:

  1. 暂停镜像 ALTER DATABASE XYZ SET PARTNER SUSPEND
  2. 移动 SQL 实例
  3. 恢复镜像 ALTER DATABASE XYZ SET PARTNER RESUME

实例正在故障转移到镜像,因为见证人和次要实例都无法再看到主实例。

听起来您正在尝试通过组合镜像和群集来重新创建 SQL Server 2012 可用性组。

数据库镜像仅在所谓的“软”错误时超时。硬错误,如集群故障转移,会立即报告给镜像会话,导致立即故障转移。在http://msdn.microsoft.com/en-us/library/ms190913.aspx阅读更多信息

硬错误的可能原因包括(但不限于)以下情况:

A broken connection or wire

A bad network card

A router change

Changes in the firewall

Endpoint reconfiguration

Loss of the drive where the transaction log resides

Operating system or process failure
Run Code Online (Sandbox Code Playgroud)

可能导致镜像超时的情况包括(但不限于)以下情况:

Network errors such as TCP link time-outs, dropped or corrupted packets, 
    or packets that are in an incorrect order.

A hanging operating system, server, or database state.

A Windows server timing out.

Insufficient computing resources, such as a CPU or disk overload, the transaction 
    log filling up, or the system is running out of memory or threads. In these 
    cases, you must increase the time-out period, reduce the workload, or change 
    the hardware to handle the workload. 
Run Code Online (Sandbox Code Playgroud)

有关镜像和潜在问题的更多信息,您可能希望查看我的问题什么会导致镜像会话超时然后进行故障转移?SQL Server 2005