vCenter Database is Full
I couple of days ago, I received a call from a customer who had a problem his vCenter server. The drive that hosted the vCenter was full. From the phone call it sounded like the full recovery opinion had been turned on.
vCenter server was on Windows 2008 R2 and had the default SQL Express instance.
Looking at Event Viewer I found these 2 errors:
Looking in the SQL log viewer I had this error:
Could not allocate space for object ‘dbo.VPX_EVENT_ARG’.’PK_VPX_EVENT_ARG’ in database ‘VIM_VCDB’ 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.
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
In the SQL logs I found this error:
Could not allocate space for object 'dbo.VE_event_historical'.'PK__VE_event_histori__00551192' in database 'ViewEvent' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files tothe filegroup, or setting autogrowth on for existing files in the filegroup.
The last two errors made it very clear, the database has reached the maximum size on SQL 2005 Express. That size is 4 GB.
Investigating on the VMware KBases I found the solution in this article: kb.vmware.com/kb/1025914
The solution is to delete the old data from the database. Attached to the KB there are the scripts for MS SQL and Oracle that simplify the job.
This is one other option that I found. I will walk you through it.
Log into the SQL servers.
Right click the instance name. Tasks -> Shrink -> Database
Click the OK button and wait.
I took the above screenshot after I ran the shrink command. The vCenter Database as over 4095MB.
I hope this helps!