当安装程序检查 Cluster_IsOnlineIfClustered 规则时,无法更新 SQL Server 群集。

本文可帮助你解决安装程序检查 Cluster_IsOnlineIfClustered 规则时发生的问题。

原始产品版本: SQL Server 2012 及更高版本 原始 KB 编号: 2817733

现象

假设出现了下面这种情景:

  • 在群集环境中,安装 Microsoft SQL Server 的实例。

  • 尝试在包含此实例的服务器上安装 SQL Server Service Pack 或累积更新。

在这种情况下,安装操作在过程中的早期失败。 具体而言,当安装程序检查 Cluster_IsOnlineIfClustered 规则时,操作会失败。 此外,Detail.txt文件中记录了类似于以下消息的消息:

<Time Stamp> Slp: Init rule target object: Microsoft.SqlServer.Configuration.Cluster.Rules.ClusterServiceFacet
<Time Stamp> Slp: The given key was not present in the dictionary.
<Time Stamp> Slp: at Microsoft.SqlServer.Chainer.Infrastructure.ServiceContainer.GetService(Type serviceType)

at Microsoft.SqlServer.Chainer.Infrastructure.ServiceContainer.GetService[T]()

at Microsoft.SqlServer.Chainer.Infrastructure.ServiceContainer.get_Cluster()

at Microsoft.SqlServer.Configuration.Cluster.Rules.ClusterServiceFacet.Microsoft.SqlServer.Configuration.RulesEngineExtension.IRuleInitialize.Init(String ruleId)

at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.Execute(Boolean stopOnFailure)

<Time Stamp> Slp: Rule initialization failed - hence the rule result is assigned as Failed

注意

Detail.txt文件位于 %ProgramFiles%\Microsoft SQL Server\110\Setup Bootstrap\Log\<YYYYMMDD_HHMM>.

原因

出现此问题的原因是 Windows Management Instrumentation(WMI)中的 MSCluster 命名空间无效。

解决方法

若要解决此问题,请执行以下步骤:

  1. 在管理命令提示符处,键入 cd %systemroot%\system32\wbem,然后按 Enter

  2. 键入命令 regsvr32 cluswmi.dll,然后按 Enter

  3. 键入命令 mofcomp.exe ClusWMI.mof,然后按 Enter

  4. 重新运行服务器上的 Service Pack 或累积更新的设置。

详细信息

若要确定此问题是由群集的 WMI 命名空间引起的,请执行以下步骤:

  1. 以群集管理员身份登录并运行 SQL Server 安装程序的帐户。

  2. 在管理命令提示符处运行该命令 wbemtest

  3. Windows Management Instrumentation Tester 窗口中,选择“ 连接...”

  4. 在命名空间键入 root\MSCluster,然后选择“连接”按钮。 在这种情况下,可能会收到类似于以下错误消息:

    数字:0x8004100e
    设施:WMI
    说明:命名空间无效

    注意

    作为其他测试,可以在 Windows PowerShell 中运行以下查询:

       SELECT name FROM <MSCluster_Cluster>
    

    如果问题不是由无效的 MSCluster 命名空间引起的,预期结果是返回群集网络名称。