During an upgrade from vCenter 5.1 update 3 to vCenter 6 update 1, I encountered the following error:
Error: Source vCenter Server schema validation found an issue. Resolution: Read the vcdb_req.err file and address the issues found.
The vCenter Server installation is using an external Microsoft SQL Server 2008 R2 SP2 database.
Errors in vcdb_req.err
A short investigation of the vcdb_req.err showed different errors:
WARNING: Cannot execute statement(rc=100). DELETE FROM VPX_TABLE ^^^^^^^^^^ WARNING: Cannot execute statement(rc=100). DELETE FROM VPX_INDEX_COLUMN ^^^^^^^^^^ WARNING: Cannot execute statement(rc=100). DELETE FROM VPX_SCHEMA_HASH ^^^^^^^^^^
1 (50000) [Microsoft][SQL Server Native Client 10.0][SQL Server]ERROR ! Missing indexes: VPX_HIST_STAT1_47.IX_VPX_HIST_STAT1_47_TIME_ID; VPX_HIST_STAT1_48.IX_VPX_HIST_STAT1_48_TIME_ID;
The first issue probably has to with a permission issue. Various posts on the VMware communities forums talk about temporarily adding the db_owner permission to the MSDB database for the vCenter account that is connecting to the database. Another option is to temporarily configure sysadmin rights for the vCenter account that used to connect to the SQL Server database.
Also walk through the steps in “Prepare Microsoft SQL Server Database before upgrading to vCenter 6.0“. The cleanup_orphaned_data_MSSQL.sql script, available on the vCenter 6 ISO will clean up your database and smoothen the upgrade process.
The second issue reports some missing indexes in the SQL Server database. I ran into this VMware communities post, which discusses the same error only for a different table/index. Missing indexes in my case are IX_VPX_HIST_STAT1_47_TIME_ID and VPX_HIST_STAT1_48.IX_VPX_HIST_STAT1_48_TIME_ID. Steps to take are (from the communities post):
- Open the SQL Management Studio, navigate to the affected table and click Indexes.
- Create a new Index, name it “IX_VPX_HIST_STAT1_47_TIME_ID”, set the type to “Nonclustered” for this specific index (note: exact settings differ per index).
- Add TIME_ID as an index column.
- Add COUNTER_ID and STAT_VAL as nonkey columns.
- Repeat the steps for the table with 48 in it.
Note 1: The index configuration should be exactly the same as the other history data tables.
Note 2: If you don’t feel comfortable editing SQL Server, create a call with VMware Global Support Services (GSS). All information is from my own experience, use these guidelines at own risk.
After running through these steps, the upgrade to vSphere 6 continued as expected.
Another KB article on the “Source vCenter Server schema validation found an issue” problem is available in the VMware Knowledge. However, this KB article was not applicable to my situation. And there ‘s this VMware KB article, which discusses different database issues when upgrading to vSphere 6.
I hope this was helpful, please leave any comments below.
Pingback: Newsletter: October 17, 2015 | Notes from MWhite