I had the same issue today. The referenced articled help, but rely on having SQL Server full available, Luckily, SQL Server Express comes with a tool to fire off queries to the database. Albeit basic, it works:
If stuck in OSQL, the following works (SQL Server Express 2005) to clean up the database from old tasks and events. Based on KB 1025914 (vCenter 4 database).
(Assuming defaults, if you need to know the server name, osql.exe -L, if you need to know the database name, look at the database files).
c:> "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\OSQL.EXE" -S <server>\SQLEXP_VIM -E
1> use VIM_VCDB
2> go
1> update vpx_parameter set value='<value>' where name='event.maxAge'
2> update vpx_parameter set value='<value>' where name='task.maxAge'
3> update vpx_parameter set value='true' where name='event.maxAgeEnabled'
4> update vpx_parameter set value='true' where name='task.maxAgeEnabled'
5> go
(1 row affected)
(1 row affected)
(1 row affected)
(1 row affected)
1> exec cleanup_events_tasks_proc
2> go
1> dbcc shrinkdatabase ('VIM_VCDB')
2> go
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
------ ----------- ----------- ----------- ----------- --------------
5 1 81080 280 78776 78776
5 2 128 128 128 128
(2 rows affected)
DBCC execution completed. If DBCC printed error messages, contact your system
administrator.
1> quit
It went from 4GB to 630MB using a 30 day retention time on tasks and events. Quite a difference :smileywink: