Monday, February 9, 2009

Make sure to defragment your VC DB

I have been doing this for years, but wanted to make sure that I shared this. If you see any performance issues with Virtual Center, this usually helps the problem.

I would assume everyone does it, but when I talk to people about it, they generally dont.

This is how to defrag the DB:

Log in to Microsoft SQL Server Management Studio as an administrator.
Right-click on the database that VirtualCenter is using.
Click New Query.
In the New Query window type:
Use (DB)
go
dbcc showcontig (VPX_HIST_STAT,VPXII_HIST_STAT)
go
where represents (DB) the name of the database that is running VirtualCenter.
Click Execute.
Look at the amount of fragmentation
To defragment
Log in to Microsoft SQL Server Management Studio as an administrator.
Right-click on the database that VirtualCenter is using.
Click New Query.
In the New Query window type:
dbcc indexdefrag ('', 'VPX_HIST_STAT', 'VPXII_HIST_STAT')
go
where represents the name of the database that is running VirtualCenter.
Click Execute.

No comments: