remove a datastore from vCenter Server Inventory
I recently had an issue where I was unable to remove a datastore from the vCenter Server Inventory.The datastore was grayed out and when right-clicking, had no options.After some digging and some research in SQL, I found a way to manually do this in the vCenter database.Every datastore is given a unique> Warning: Always make a SQL backup before attempting any manual database changes.You never know when things might break and you need to restore.So here we go:
[*] Stop the vCenter Server Service
[*] Open SQL Management Studio
[*]
Run the following against your vCenter Server database (This will give you the datastore>
select>
[*]
Now we have the>
[*]
Run the following 3 queries individually (Using the>
delete from VPX_DS_ASSIGNMENT where DS_ID=ID;
delete from VPX_VM_DS_SPACE where DS_ID=ID;
delete from VPX_DATASTORE where>ID;
[*] Finally, run the following:
delete from VPX_ENTITY where>ID;
If you want to verify that everything went correctly, you can run the following:
select * from VPX_DS_ASSIGNMENT where DS_ID=ID;select * from VPX_VM_DS_SPACE where DS_ID=ID;select * from VPX_DATASTORE where>select * from VPX_ENTITY where> Now you’ve removed the datastore from the database and can start the vCenter Server Service again. If you don’t see that it has been removed, a reboot may help. I rebooted my server just to be on the safe side.
页:
[1]