My VMware vCenter Service failed and unable to start the service. I have reveiwed the logs from vpxd.log file and got the below error message, whenever I try to start the virtual center service.
“ODBC error: (42000) – [Microsoft][SQL Native Client][SQL Server]Could not allocate space for object <object> in database ‘<database>’ because the ‘<filegroup>’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.” is returned when executing SQL statement “<sql statement>” .
An unrecoverable problem has occurred, stopping the VMware VirtualCenter service. Error: Error[VdbODBCError] (-1) “ODBC error: (42000) – [Microsoft][SQL Server Native Client 10.0][SQL Server]Could not allocate space for object ‘dbo.VPX_HOST_VM_CONFIG_OPTION’.’PK_VPX_HOST_VM_CONFIG_OPTION’ in database “vcenter4.1″ because the ‘PRIMARY’ filegroup is full”
I have resolved the issue by following the KB Article 1025914. I strongly recommend to read the Caution and NOTE mentioned in the KB Article before the running the script to purge the vCenter SQL database.
Take the backup of vCenter database before running the script.
Here Explain you the step by step procedure which i have followed to resolve the issue.
1. Login to your vCenter database server and connect the DB using SQL server Management Studio.
2. Download the Script from the above mentioned KB Article under “Attachment” Sections.
3.Stop the vCenter server service If it is running.
4. Right click the vCenter database and select new Query.
5. Right click the Script and Edit . Open with Notepad to copy the script and paste it in SQL Query or Double click the Downloaded SQL script “VCDB_table_cleanup_MSSQL_v4.X.sql” to open with.
Make sure You have selected the vCenter Server Database to run this script.
6. Edit the below section in the script to specify the events for number of days to delete. In the Script , It is mentioned as 180 Days.
I don’t want to delete events for 180 days. I only want to delete the events for 15 days. So Edited to 15. Refer the below screen shot
7. Execute the script to test how many tables will be deleted as part of running this script. It will not actually delete the tables. Find the below result.
8 Edit the script to actually delete the Script by modifying the value “SET @DELETE_DATA = 1” to delete the tables and purge the database
Edit the Value to 1.
9.Script completed successfully.
I tried to start the vCenter service after the script completed running. It started successfully.
Thanks For Reading !!!!