So today a vCenter Server Service wouldnt start Java was going mental and we kept seeing event IDs 1105 and 1827. So what this means is our SQL Express instance reached the limits the size of databases i.e. 10GB on SQL Express 2008 R2.

You can confirm this by looking at the size of the VIM_VCDB.MDF file in c:\program files\Microsoft SQL Server\MSSQL10_50.VIM_SQLEXP\MSSQL\Data, if its 10GB then your in trouble.

So the first thing to do is fire up Microsoft SQL Server Management studio and run a standard report against the VIM_VCDB by right clicking the DB > Reports > Standard Reports > Disk Usage by Top Tables:

From here you can see which tables are causing the problems, in my case its dbo.VPX_EVENT_ARG which is massive.

So from here you need to purge the above table:

From Microsoft SQL Server Management studio

Click databases to expand and select VIM_VCDB > Tables.

Right-click the dbo.VPX_PARAMETER table and select Open.Note

: If you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click Edit Top 200 Rows.

Modify event.maxAge to 30, and modify the event.maxAgeEnabled value to true.

Modify task.maxAge to 30, and modify the task.maxAgeEnabled value to true.

Next run a built-in stored procedure to shink the logs:

Go to VIM_VCDB > Programmability > Stored Procedures.

3. Right-click dbo.cleanup_events_tasks_proc and select Execute Stored Procedure. This purges the data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.

Now the records have been purged you need to shrink the DB:

As before connect using SQL Server Management Studio.

2. Right click on the VIM_VCDB database and New Query, when the white SQLQuery box opens type the below and click ! Execute

1

dbcc shrinkdatabase(VIM_VCDB,5)

3. It’ll start running and when its finished you should see:

Check the size of the file again and you should be able to start the services.

Subscribe to my posts

Dont like Adverts

I know the adverts are annoying but I only use them to pay for hosting. If you find any of my posts useful then I’d really appreciate it if you could disable your ad-blocker and click a advert of two.
Or if not then you could buy me a coffee?
Thanks