Recently, I learned a bit about vCloud Director internal database and table structure which I am going to share with you here.
vCD holds two types of tables worth pointing out: the ORTZ and INV tables. The latter store information about vCenter Server inventory (INV) and are kept up-to-date as the inventory changes. This could be due to changes vCD makes itself or those carried out be an administrator. When the vCD service starts up it connects to vCenter to read in its inventory and update its INV tables. The QRTZ tables are used for heart beating and synchronization between cells (at least from what I understood, no guarantees).
Why am I telling you this? Both types of tables can be cleared without losing any vital data. You can make use of this knowledge whenever you feel your vCloud DB is out of sync with the vCenter inventory. This happens for example in the case where you have to restore your vCenter Database from a Backup without restoring vCloud’s database.
WARNING: Following this procedure is completely unsupported by VMware GSS. Follow the instructions below on your own risk or when you have no support for your installation anyway 😉
Here some SQL statements that will automate step 2 for you:
delete from QRTZ_SCHEDULER_STATE; delete from QRTZ_FIRED_TRIGGERS; delete from QRTZ_PAUSED_TRIGGER_GRPS; delete from QRTZ_CALENDARS; delete from QRTZ_TRIGGER_LISTENERS; delete from QRTZ_BLOB_TRIGGERS; delete from QRTZ_CRON_TRIGGERS; delete from QRTZ_SIMPLE_TRIGGERS; delete from QRTZ_TRIGGERS; delete from QRTZ_JOB_LISTENERS; delete from QRTZ_JOB_DETAILS; delete from compute_resource_inv; delete from custom_field_manager_inv; delete from cluster_compute_resource_inv; delete from datacenter_inv; delete from datacenter_network_inv; delete from datastore_inv; delete from datastore_profile_inv; delete from dv_portgroup_inv; delete from dv_switch_inv; delete from folder_inv; delete from managed_server_inv; delete from managed_server_datastore_inv; delete from managed_server_network_inv; delete from network_inv; delete from resource_pool_inv; delete from storage_pod_inv; delete from storage_profile_inv; delete from task_inv; delete from vm_inv; delete from property_map;