I don’t know how many of you ever have to move your vCenter Databases, but I ran into this after installing vCenter on SQL Express for a small installation.
Even if you install SQL Express manually before deploying vCenter, the SQL installation GUI forces you to install the server binaries AND data files to the C: drive. Not a best practice in most environments….
Of course, most of us will not be using SQL Server Express in Production…but in case any of you are crazy enough to do so (again, DON’T DO IT), you may want to consult the following VMware and Microsoft KB’s to assist you in migrating at least your data files off of the C: drive:
SQL Express does not come with the necessary Management Studio required to perform these admin functions. So, I had to download the SQL 2008 R2 Management Studio Express. I was able to find it at the following link:
NOTE: Make sure to download the 64-bit option that says “with tools” and ONLY install the Management Studio
Overall, I did not have any trouble with the workflows described. I initially tried to use the Management Studio GUI to perform the operations listed in Microsoft’s KB after stopping all VMware\vCenter-related Services. However, some mystery process seemed to be holding a lock on the vCenter DB files.
I then opened Microsoft’s SQL Editor and ran the script commands. The vCenter DB did drop properly, and I successfully re-added it after moving the data files (*.mdf AND *.ldf).
It is best to run these steps before you begin adding data from vCenter operations. However, again, for your mission critical vSphere deployments, do not use SQL Express.
A better solution for a Production vCenter installation is to run the vCenter database on a highly available platform, in this case Microsoft SQL Server, using the database manufacturer’s own clustering technologies that are managed by your company’s DBA’s to ensure optimal performance.