2 Replies Latest reply on May 12, 2020 6:38 PM by Ajay1988

    db seems corrupted

    Rebelno1 Lurker

      Hi guys hoping you can help me today

      my vCenter services has stopped when i look at the vpxd.log i saw the errors

       

      info 'Default'] Creating SSL Contexts

      error 'vpxdvpxdDatastore'] Duplicate name (H2o1) in datastore folder

      error 'vpxdvpxdMain'] [Vpxd::ServerApp::Init] Init failed: VpxdDatastore::Init(gDB)

      --> Backtrace:

      --> backtrace[00] rip 000000018018b7fa

      --> backtrace[01] rip 0000000180104c78

      --> backtrace[02] rip 0000000180105f6e

      --> backtrace[03] rip 000000018008ff08

      --> backtrace[04] rip 0000000001125bac

      --> backtrace[05] rip 0000000001146722

       

      So I open my database and try to find these duplicate ID's

       

      and run a select * from vpx_entity where NAME='H2o1'

      and see two duplicate id's

      11305

      31289

      and try to delete the largest as suggested in many articles on the web  as this is more likely the latest invalid ID   running this command

      DELETE FROM VPX_ENTITY WHERE ID = 31289;

       

      but i get this error

      The DELETE statement is in conflict with the REFERENCE constraint " FK_VPX_DS_A_REF_VPX_DATA " . The conflict occurred in database " VCDB " table " dbo.VPX_DS_ASSIGNMENT " column ' DS_ID ' .

      The statement has been terminated

       

      I cannot delete this entry for some reason can anyone let me know hopefully there is SQL expert among you

      what i need to do to get this duplicate ID out as I have not got a back up of the database so i cannot afford to lose this one .

       

      please help !

       

      Thanks in advance