Virtual center is crashy and it's databases are easily corrupted, as I've experience over the years. How do I do proper maintenance on it to keep such below happenstances from occurring in the future? How can I rebuild the database without doing a reinstall or restore?
--
My VirtualCenter Server was out of commission, since I couldn't do a reasonable amount of work on it before it crashed and needed to "net start vpxd" (restart the VMware VirtualCenter Service)
The errors that I saw in the event log seem related to database integrity.:
< An unrecoverable problem has occurred, stopping the VMware VirtualCenter service.
Check database connectivity before restarting. Error: Error[VdbODBCError] (-1) "ODBC
error: (08S01) - [ODBC SQL Server Driver]Communication link failure" is returned when
executing SQL statement "UPDATE VPX_ENTITY SET NAME = ? , TYPE_ID = ? , PARENT_ID = ? WHERE ID = ?".>
Anyway, the database is local. It's using the express version of MSSQL (Microsoft SQL Server Desktop Engine), which was recommended or at least the default option when I first installed it. I downloaded the "SQL Server Management Studio Express" to defrag the DB and do a few other things the knowledge bases suggested, but to no avail. (the db was indeed heavily fragmented and I was able to shrink the size of the DB from 500 to 425 mb)
Further troubleshooting left me long in the tooth. Not really having a clue, I thought rebuilding the database from scratch would be pertinent, so I "vpxd -b" to recreate the database repository - still had a 500mb database file, but now VirtualCenter wouldn't start at all. In the end, I just did a restore from 16 months ago. After the initial setup last year, I backed up the "MSSQL$MSDE_VC" and the "vmware" folder in program files. After disconnecting/reconnecting the hosts and cleaning up a few orphans, I'm fully operational
I may have significant changes in the future and my last fix may not be a option next time.