VMware Cloud Community
godot72
Contributor
Contributor
Jump to solution

vCenter 5.5 on SQL Server - Deleted VPX_HIST_STAT Tables and Now vCenter Won't Start

Hi, I inherited a vCenter 5.5 installation a couple months ago.  I cranked up the stats collection and ran our SQL Server Express v8 database out of space.  I shut vCenter down and went in to SQL Server Manager and deleted all the stats tables (i know, i know) and now vCenter will not start.  I have no backups.  The error in the vxpd log is:

2023-12-16T16:14:43.344-05:00 [07152 error 'Default'] [VdbStatement] SQLError was thrown: "ODBC error: (42S02) - [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot find the object "VPX_HIST_STAT1_16" because it does not exist or you do not have permissions." is returned when executing SQL statement "TRUNCATE TABLE VPX_HIST_STAT1_16"

I figure if i recreate the table then maybe vcenter will start.  I may have to recreate 4 tables or i may have to recreate all of them.  But i can't because i don't have the DDL/table definitions/whatever for these tables.  Can someone please help a foolish vmware admin out?

If recreating the table(s) is not The Way then any other advice will be appreciated.

-g72

0 Kudos
1 Solution

Accepted Solutions
ThompsG
Virtuoso
Virtuoso
Jump to solution

Hello there @godot72 

 

Now we are not going to mention the importance of backups or not manually deleting tables from SQL without them or that vCenter 5.5 is long out of support as this would serve you no purpose at this point 🙂

 

I'm unsure on the rules around posting the required SQL to rebuild the removed tables but if you private message me then I can provide what you are looking for.

 

At the moment, in my lab, I removed the VPX_HIST_STAT1_16 table to confirm I got the same message as you did. Then rebuilt from an export of the table design. Please note, I make no guarantees there isn't issues down the road from doing this, but everything seems to be working from what I can tell after doing this.

 

Kind regards,

View solution in original post

3 Replies
pcgeek2009
Hot Shot
Hot Shot
Jump to solution

It has been a while on working with 5.5. If you happen to still have the installer, you may be able to bring an installation on another Windows box, let it create the tables, then just export those tables you need and do a restore to the old DB (take a backup or snap of it first). This way the format of the tables is correct. Not sure if that will work, but that would be the first place I would start. 

0 Kudos
pcgeek2009
Hot Shot
Hot Shot
Jump to solution

I did find this KB on pretty much the same error you are seeing:

https://kb.vmware.com/s/article/2104222

If it is not a very complex environment, what are the chances you can upgrade to 6.5 (7 or 8 does not support ESXi 5.5) and migrate the host to get back up and running?

 

0 Kudos
ThompsG
Virtuoso
Virtuoso
Jump to solution

Hello there @godot72 

 

Now we are not going to mention the importance of backups or not manually deleting tables from SQL without them or that vCenter 5.5 is long out of support as this would serve you no purpose at this point 🙂

 

I'm unsure on the rules around posting the required SQL to rebuild the removed tables but if you private message me then I can provide what you are looking for.

 

At the moment, in my lab, I removed the VPX_HIST_STAT1_16 table to confirm I got the same message as you did. Then rebuilt from an export of the table design. Please note, I make no guarantees there isn't issues down the road from doing this, but everything seems to be working from what I can tell after doing this.

 

Kind regards,