After the update of vCenter it could happen that the service don’t starts. In vpxd.log the following error appears “Database version id ‘<ID>’ is incompatible”.
VMware describes the error with:
“A vCenter server upgrade can fail for variety of reasons
Those “variety” reasons could be the following:
- Minimum system requirements not reached
- Known problems written in the release notes
- Integrity of installation media(…ugh sorry?)
- Status of database server (transaction log full; heavily fragmented…)
- Database was restored by an older version of vCenter and the old schema is not compatible with the new version of vCenter.
- The installation process generated an error.
The last KB article describes nearly the failure which I’ve had found.
Our vCenter database was moved from one SQL to another. In this migration the user and database roles were not moved too.
The vpxuser had the dbo role but not the VMW schema set per as default. Additional the user had no rights in the msdb database.
After an upgrade of vCenter you could identify the error by looking in the tableview of the database. You will find all tables of both schemas (dbo and VMW)
I’ve had rolled back the installation of vCenter (puhh snapshot :) ) and restored the SQL database.
In the next step I run the following SQL script (you can find it in the documentationpubs.vmware.com) which corrects the roles and rights on SQL server (remove DBOwner for vpxuser before you run the script!):
USE vcdb ALTER USER [vpxuser] WITH DEFAULT_SCHEMA =[VMW] go if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_ADMIN_ROLE') CREATE ROLE VC_ADMIN_ROLE; GRANT ALTER ON SCHEMA :: [VMW] to VC_ADMIN_ROLE; GRANT REFERENCES ON SCHEMA :: [VMW] to VC_ADMIN_ROLE; GRANT INSERT ON SCHEMA :: [VMW] to VC_ADMIN_ROLE; GRANT CREATE TABLE to VC_ADMIN_ROLE; GRANT CREATE VIEW to VC_ADMIN_ROLE; GRANT CREATE Procedure to VC_ADMIN_ROLE; if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_USER_ROLE') CREATE ROLE VC_USER_ROLE; GRANT SELECT ON SCHEMA :: [VMW] to VC_USER_ROLE; GRANT INSERT ON SCHEMA :: [VMW] to VC_USER_ROLE; GRANT DELETE ON SCHEMA :: [VMW] to VC_USER_ROLE; GRANT UPDATE ON SCHEMA :: [VMW] to VC_USER_ROLE; GRANT EXECUTE ON SCHEMA :: [VMW] to VC_USER_ROLE; sp_addrolemember VC_USER_ROLE , [vpxuser]; sp_addrolemember VC_ADMIN_ROLE , [vpxuser]; use MSDB if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_ADMIN_ROLE') CREATE ROLE VC_ADMIN_ROLE; go GRANT SELECT on msdb.dbo.syscategories to VC_ADMIN_ROLE; GRANT SELECT on msdb.dbo.sysjobsteps to VC_ADMIN_ROLE; GRANT SELECT ON msdb.dbo.sysjobs to VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_add_job TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_delete_job TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_update_job TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO VC_ADMIN_ROLE; GRANT EXECUTE ON msdb.dbo.sp_add_category TO VC_ADMIN_ROLE; sp_addrolemember VC_ADMIN_ROLE , [vpxuser];
After that the update of vCenter runs like a charm.
Leave a Reply