Last week I had a customer running on a SQL express database with a 10 GB upper limit. The customer called us in because the vCenter service was crashing almost daily.
Upon inspecting the event log I saw the following:
Source MSSQL$SQLEXPRESS Event 1105
Could not allocate space for object ‘dbo.VPX_TEMPTABLE0’ in database ‘VIM_vCenter’ because the ‘PRIMARY’ 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.
Luckily Scott March has some good tips on his blog
I connected to the SQL Express instance and executed the following commands:
truncate table vpx_hist_STAT1
truncate table vpx_hist_STAT2
truncate table vpx_hist_STAT3
truncate table vpx_hist_STAT4
truncate table vpx_sample_time1
truncate table vpx_sample_time2
truncate table vpx_sample_time3
truncate table vpx_sample_time4
After all the commands completed I proceeded to shrink the database:
From 10 GB to 1,79 GB – what a difference – now we are ready to rock and roll again!
To prevent something like this from happening again, you might want to consider enabling Database Retention Policy and setting it around 180 days or whatever your preference maybe so these data do not get kept forever.
You can find this setting here: vSphere Client: Administration -> vCenter Server Settings -> Database Retention Policy.
If this helped you PLEASE leave a comment!
Incoming search terms:
- vcenter database full