How to move VirtualCenter Database from SQL Express to SQL Server 2005

Author: NetworkAdminKB.com
Created: 2009-07-03
Modified: 2009-10-31

Information:

Perquisite Knowledge and Assumptions

1)      Stop all the VirtualCenter Services

2)      Backup the existing VirtualCenter Database

a.       Connect to the embedded SQL Server (SQLEXP_VIM)

b.      Run the following command to backup the VIM_VCDB

BACKUP DATABASE VIM_VCDB

      TO DISK = 'C:\Backup\VIM_VCDB.bak'

      WITH FORMAT

3)      Optional: If present backup the existing Update Manager Database

a.       Connect to the embedded SQL Server (SQLEXP_VIM)

b.      Run the following command to backup the

BACKUP DATABASE VIM_UMDB

      TO DISK = 'C:\Backup\VIM_UMDB.bak'

      WITH FORMAT

4)      Stop and Disable the Local SQL Server (SQLEXP_VIM) services

5)      Restore the VirtualCenter Database to the new SQL 2005 Server

a.       I would keep the same DB name, but you can change it if you like.

b.      See the perquisites for more information on how to restore a database

6)      Optional: If present restore the Update Manager Database

a.       I would keep the same DB name, but you can change it if you like.

b.      See the perquisites for more information on how to restore a database

7)      Create a SQL Login account

a.       Account Name: VCAdmin

b.      Password: any

c.       Uncheck Enforce Password expiration

d.      Default Database: the VirtualCenter database

e.       Click OK

8)      Configure VCAdmin as the Database Owner of the VirtualCenter Database

a.       Run the following command against the VirtualCenter Database

exec sp_changedbowner 'VCAdmin'

b.      You can verify that the VCAdmin is the owner of the database.

        

9)      Optional: If moving the Update Manager Database configure VCAdmin as Owner of the Update Manager Database

10)  Reconfigure the ODBC Settings

a.       Open Data Source (ODBC)

b.      Click the System DSN tab

c.       Select the VMWare VirtualCenter Database DSN name

d.      Click Configure

e.       Type in the SQL Server and the Instance Name (if any)

                                                               i.      Click Next

f.        Select With SQL Server authentication…

g.       Type in the VCAdmin username and password

                                                               i.      Click Next

h.       Change the default database to the VirtualCenter Database (VIM_VCDB if using the default name).

                                                               i.      Click Next

i.         Click Finish

j.        Click the Test Data Source… button to verify everything is working.

k.      Click OK

l.         Click OK

11)  Optional: Reconfigure ODBC Settings for the Update Manager Database

a.       Repeat the procedure from above adjusting for the Update Manager Database as needed.

12)  Update the Username and password used by VirtualCenter.

a.       Log in to the VirtualCenter Server console.

b.      Run Regedit

                                                               i.      Goto: HKLM\SOFTWARE\VMware, Inc.\VMware VirtualCenter\DB

                                                             ii.      The user that is configured for database connectivity is in the 2 registry key. 

                                                            iii.      Right-click on the 2 key, and select modify.

                                                           iv.      Change the Value data to the name of the new user account (VCAdmin)

c.       Open a command prompt

                                                               i.      Run the following commands

1.      CD /D “C:\Program Files\VMware\VMware VirtualCenter 2.0”

a.       Changes to the default install location of VirtualCenter, modify as needed.

2.      vpxd.exe -p

a.       When prompted, enter the new password and press Enter.

b.      Retype the password and press Enter again to complete the password change.

13)  Optional: Update the Username and password for Update Manager

a.       Use the repair option of on the Update Manager add/remove programs item to configure the new Username and password for the Update Manager DSN.

b.      How to Repair the VMware Update Manager Database or Installation files

14)  Start all the VirtualCenter Services

15)  Log into VirtualCenter

16)  Verify Database Connections

a.       Using the SQL Activity Monitor verify connections to the VC and Update Manager Databases

b.      Optional: Verify connections to the Update Manager Database as well.

17)  Use the following KB Article from VMWare to create SQL Agent Jobs as needed.

a.       After VirtualCenter 2.5 upgrade: Performance data is currently not available for this entity

b.      This will require the VCAdmin account to have the Server Role - sysadmin permission to the SQL Server.  This permission can be removed after configuring the jobs.

c.       Use the most recent Upgrade-vX-to-vY folder as appropriate for your environment.

 

 

 

More Information:

How to Repair a VirtualCenter Installation or Database

Moving a Virtual Centre DB from one SQL Server to another

Moving the VirtualCenter SQL Database

Troubleshooting the database data source used by VirtualCenter Server

Migrate vCenter database from SQL Express to full SQL Server

 

Article ID: 337, Created On: 9/19/2011, Modified: 9/19/2011