vCenter Server 服务无法启动,并出现“DB Schema hash mismatch”错误
search cancel

vCenter Server 服务无法启动,并出现“DB Schema hash mismatch”错误

book

Article ID: 343184

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
免责声明:本文为 vCenter Server services fail to start with error: DB Schema hash mismatch (1031719) 的翻译版本。尽管我们会不断努力为本文提供最佳翻译版本,但本地化的内容可能会过时。有关最新内容,请参见英文版本。


  • 无法启动 VMware VirtualCenter Server 服务
  • 启动 VMware VirtualCenter Server 服务失败
  • 在事件日志中,您会看到类似下文的错误:

    Database version id '410' is incompatible with this release of VirtualCenter.
    Database version id '501' is incompatible with this release of VirtualCenter.

  • vCenter Server 服务无法启动。
  • 您会看到以下错误:

    Windows 无法启动本地计算机上的 Virtual center。检查系统日志。如果是非 Microsoft 服务供应商,请参考服务特定供应商的错误代码 2 (Windows could not start Virtual center in the Local computer. review system event log. If tis is a non Microsoft-service vendor and refer to service specific vendor error code 2)

  • vpxd.log 文件中,您会看到类似下文的条目:

    YYYY-MM-DDT<time> [04996 info 'utilvpxdVdb'] [VpxdVdb::SetDBType] Logging in to DSN: vcenter with username vcuser
    YYYY-MM-DDT<time> [04996 info 'Default'] [VdbSchemaLoader::LookupSchemaFromDB] Loaded schema and index information from DB
    YYYY-MM-DDT<time> [04996 info 'utilvpxdDbSchemaHash'] [VpxdDbSchemaHash::GetSchemaFilename]: sqlDir: C:\Program Files\VMware\Infrastructure\VirtualCenter Server\sql\
    YYYY-MM-DDT<time> [04996 info 'utilvpxdDbSchemaHash'] [VpxdDbSchemaHash::CheckSchema]: schema file: C:\Program Files\VMware\Infrastructure\VirtualCenter Server\sql\VCDB_mssql.sql
    YYYY-MM-DDT<time> [04996 error 'utilvpxdDbSchemaHash'] [VpxdDbSchemaHash::CheckSchema] DB schema hash mismatch
    YYYY-MM-DDT<time> [04996 error 'utilvpxdDbSchemaHash'] [VpxdDbSchemaHash::CheckSchema] File: 4ae87f5460fe1cc421f75caf1844f15e
    YYYY-MM-DDT<time> [04996 error 'utilvpxdDbSchemaHash'] [VpxdDbSchemaHash::CheckSchema] DB: 189f5786f3b0b59411dec2d8f9411ed9
    YYYY-MM-DDT<time> [04996 error 'vpxdvpxdMain'] [Vpxd::ServerApp::Init] Init failed: VpxdDbSchemaHash::CheckSchema()
    --> Backtrace:
    --> backtrace[00] rip 000000018018aafa
    --> backtrace[01] rip 0000000180102568
    --> backtrace[02] rip 00000001801038de
    --> backtrace[03] rip 000000018008d24b
    --> backtrace[04] rip 00000000003e5c2c
    --> backtrace[05] rip 0000000000406512
    --> backtrace[06] rip 000000014081ca8f
    --> backtrace[07] rip 000000014081b3dc
    --> backtrace[08] rip 0000000140a3cbdb
    --> backtrace[09] rip 000007fefe71a82d
    --> backtrace[10] rip 00000000775059ed
    --> backtrace[11] rip 00000000779ac541</time></time></time></time></time></time></time></time>

    YYYY-MM-DDT<time> [04996 error 'Default'] Failed to intialize VMware VirtualCenter.Shutting down...</time>
    --> backtrace[00] rip 000000018018aafa


Environment

VMware vCenter Server 4.0.x
VMware vCenter Server 4.1.x
VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x
VMware vCenter Server 5.0.x

Cause

在以下情况中会出现此问题:
  • vCenter Server 数据库还原为早期版本(与 vCenter Server 当前版本不兼容),导致数据库架构不匹配。
  • 在 vCenter Server 升级过程中,数据库升级流程在修改当前数据库架构之后失败。

Resolution

要在存在架构不匹配的情况下解决此问题,请还原与 vCenter Server 的当前内部版本关联的 vCenter Server 数据库正确版本。

要验证是否存在 vCenter Server 数据库架构不匹配问题,请执行以下操作:
  1. 使用 SQL 管理工具连接到 vCenter Server 数据库。
  2. 运行此查询,以在 vCenter Server 数据库中列出 VPX_Version 表中的行:

    Select * from VPX_Version

  3. 记录 VERSION_VALUE 字段中的值。
  4. 打开 vpxd.log 文件并找到文件的初始标头。该标头显示 vCenter Server 的当前版本。

    例如,显示的标头类似于以下内容:

    Section for VMware VirtualCenter, pid=4472, version=5.1.0, build=1235232, option=Release

  5. 比较步骤 2 和步骤 3 中记录的 vCenter Server 版本。如果版本不匹配,vCenter Server 数据库会运行一个错误的架构。

要将数据库架构升级到正确版本,请执行以下操作:

  1. 卸载 vCenter Server。
  2. 从备份还原 vCenter Server 数据库。
  3. 使用“使用现有数据库”选项重新安装 vCenter Server。


Additional Information

vCenter Server services fail to start with error: DB Schema hash mismatch