With great virtualisation comes great responsibility!

I was mucking around with one of the SQL servers used for Virtual Centre because the SYSTEM drive was full and found some interesting problems.

After some investigation I discovered that the transaction logs of the VC databases were averaging 1.4 GB each.

To get around this I adjusted the recovery model of the databases to simple and then shrunk the log files.  Code excerpt below.


USE master
GO

ALTER DATABASE Virtual Center Database
SET RECOVERY MODEL SIMPLE
GO

USE Virtual Center Database
GO

DBCC SHRINKFILE(Virtual Center Database_log, 1)
BACKUP LOG Virtual Center Database
WITH TRUNCATE_ONLY
DBCC SHRINKFILE(Virtual Center Database_log, 1)
GO

Discuss!!

§252 · April 1, 2009 · VMWare · Tags: , , · [Print]

Leave a Reply