What's Latest :

How to change the vCenter Database to a different Database server

As I mentioned in a previous post I was doing a vCenter upgrade and I had to migrate the DB server in to a different SQL Express Database server. So, I want to share the steps that I followed to do the DB migration and pointing the vCenter to the new DB server. 

I have taken a full DB backup and restored to a different SQL instance (built in the new server), once I completed that I created a new ODBC connection to the new server.



Tested the DB connection and it was successful.

After that changed the "vcdb.properties" file to point the new DB server to the vCenter server which is in the "C:\ProgramData\VMware\VMware VirtualCenter"


Added the new DB server name to the "vcdb.properties" file


After that updated the Registry values with the new ODBC connection which is in the "HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VirtualCenter\DB" location with the new ODBC connection name.


Updated the vCenter DB password from the command line, change the path location to "C:\Program Files\VMware\Infrastructure\VirtualCenter Server" and executed the "C:\Program Files\VMware\Infrastructure\VirtualCenter Server\vpxd.exe -p" command to update the password in the vCenter server. Type the new DB password when prompt (you have to enter two times).

Synchronized the password using "C:\Program Files\VMware\Infrastructure\VirtualCenter Server\vpxd.exe -s" command. You can see the similar output like this in the command prompt.


Further to this....

If you are not able to connect to the DB from the vCenter server check the latest vpxd log files to check the connectivity issues. I was not able to connect to the DB at the first time and after checking the log I was able to understand that DB was still pointing through the old ODBC connection. Password update and syncing from the command line fixed the issue.

VPXD Similar out put was like this

7T00:40:57.721-05:00 [03276 info 'Default'] [VpxdVdb::SetDBType] Logging in to DSN: vCenter41DSN with username sa
2017-07-07T00:41:06.549-05:00 [03284 warning 'VpxProfiler' opID=SWI-dd6b7bba] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:41:18.549-05:00 [03284 warning 'VpxProfiler' opID=SWI-8a99ad03] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:41:18.878-05:00 [03276 info 'Default'] [VpxdVdb::SetDBType] Logging in to DSN: vCenter41DSN with username sa
2017-07-07T00:41:30.550-05:00 [03284 warning 'VpxProfiler' opID=SWI-59ab1d56] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:41:42.550-05:00 [03284 warning 'VpxProfiler' opID=SWI-5e2ac923] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:41:54.550-05:00 [03284 warning 'VpxProfiler' opID=SWI-bb30d26a] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:42:01.051-05:00 [03276 info 'Default'] [VpxdVdb::SetDBType] Logging in to DSN: vCenter41DSN with username sa
2017-07-07T00:42:06.551-05:00 [03284 warning 'VpxProfiler' opID=SWI-7e09f4fa] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms
2017-07-07T00:42:18.551-05:00 [03284 warning 'VpxProfiler' opID=SWI-5ecca5da] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

Reference VMware KB Articles for this post:

No comments