VMWare vCenter Server requires a sql database engine to store it’s data. During the vCenter installation there is an option to choose a “Microsoft SQL Server 2005 Express” instance for small scale deployments.
I have installed the local SQL engine on my vCenter virtual machine and now I want to migrate this database to a central SQL server.
There are several ways to do that and this is how I migrated my VIM_VCDB from the local SQL instance to my central server.
How to backup a “small scale” VMWare vCenter deployment database?
Open a command prompt with elevated permissions (I am working from a Windows Server 2008 R2 server) and type the following command:
sqlcmd -S localhost\SQLEXP_VIM -E
This command will connect to the local SQL Server 2005 Express edition installation and use the named instance of SQLEXP_VIM.
BACKUP DATABASE VIM_VCDB TO DISK = "C:\Temp\VIM.bak" WITH NOFORMAT, INIT, NAME = "VCENTER", SKIP,NOREWIND, NOUNLOAD, STATS = 10 GO
Backup database will create a backup file called VIM.bak of the VIM_VCDB running on the local sql database engine.
I copied the VIM.bak file and used the Microsoft SQL Server Management Tools to restore the database, added the Computer account the the SQL Server security and assigned db ownership. I opened ODBC and changed the System DSN to the central sql server. Restarted the VMware VirtualCenter Server service and everything was up and running again.
Make sure to uninstall the local SQL server instance from Add/Remove progams.
Vigo Sun
Update so fast.
Ivan
Hey Vigo,
Good to see you here!
While working today on the vCenter server I made some notes and published that to my site. I have used same procedure before but with a WSUS database.
Check out this post. On the vCenter server the sqlcmd tool was installalled out of the box now.
How to backup or export a WSUS 3.0 database?
knev
Thanks for sharing this, It works easily and to backup