Friday 2 December 2011

How to move a SCVMM 2012 database to another SQL server

I'm not exactly re-inventing the wheel here as it's the same process for Virtual Machine Manager 2012 as it was for 2008 R2, but I thought I'd post about it anyway.

This isn't a common thing to need to do, but I found myself in the position today where I wanted to move the database that was on a local SQL install on a SCVMM 2012 server up onto a new SQL Cluster I had just finished building.

So these are the steps I took to move the database:
  1. Take a snapshot of the server (assuming it's a VM)
  2. Take a backup of the existing VMM DB
  3. Uninstall VMM and choose the Retain Database option
  4. Detach the VMM DB from the local SQL instance
  5. Copy the VMM DB files across to the new SQL Server
  6. On the remote SQL server, attach the VMM db
  7. Re-install SCVMM 2012 and when prompted, point it at the new SQL server, selecting to use an existing database (the one you imported) 
Easy!  Now you're free to uninstall SQL as and when.


Kevin said...

Great post. But is there a way to do this without having to reinstall VMM? It would be great just to be able to make a configuration change in VMM to point to the other SQL server.

Steve Beaumont said...

I've not tested it, and it's sure to be unsupported, but there is only 1 registry key that contains SQL information, so this might be as simple as altering those details.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Sql

RobertSeattle said...


I tried your "hack" and it worked fine - thanks for the idea.

Dayakar said...

Nice trick - Worked for me as well

Anonymous said...

Thanks Steve, worked for me.

Unknown said...

For Standalone VMM (SC 2012) Server:

For Clustered HA VMM (SC 2012 R2):

Micheal Alexander said...

Wow what a great blog, i really enjoyed reading this, good luck in your work. Azure Administration for AWS SysOps AZ-010