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 VCenter SQL express full
- vmware and sql server express or full
- vcenter sql db full
- vcenter database 100% full
- truncate vmware database
- truncate table VPX_HIST_STAT1;
- truncate table VPX_HIST_STAT1
- shrink vcenter database SQL Express
- Free space VMWare SQLExpress database