Details
When upgrading a vCenter Server Microsoft SQL Server (MSSQL) database from vCenter Server 4.x to 5.x, the upgrade fails with the following error messages:
Failed to execute command: create unique clustered index VPXI_DEVICE_COUNTER_INDEX on VPXV_DEVICE_COUNTER(entity_id, device_name, stat_id)
Got exception: ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]CREATE INDEX failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.
Error while upgrading: ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]CREATE INDEX failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.
Solution
This issue occurs when the compatibility level of the 4.x database is set to an MSSQL version earlier than the actual MSSQL version. Before upgrading the database, set the compatibility level of the database to the current version.
This issue can also occur when upgrading the database from vCenter Server 4.0 to 4.1 update. In this case, you must set the database compatibility to MSSQL 2005 or later.
Based on VMware KB 2001748