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.
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.
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
- vmware sql express
- vsphere datbase full
- vcenter reached max sql db limit
- vCenter dbo VPX_hist_stat1 truncate
- vcenter db out of space
- vcenter 5 5 shrink database
- vcenter 5 1 setting database retention policy does it shrink size
- vsphere6 sqlexpress
- sql_truncate_5 x sql