Home > SCVMM, SCVMM R2, Tips&Tricks, Virtualization, Windows 2008 R2 > VMM tricks: How to manually remove a host from the VMM database

VMM tricks: How to manually remove a host from the VMM database

Source

The following steps outline the procedure to manually remove a host cluster from the VMM database. In this specific example, we are removing a two node cluster.

Note The GUIDs listed below are specific to this example. If following these instructions, you will need to determine this same information for your specific environment. This information can be found in the tbl_ADHC_Host.

The following steps outline the manual process of removing all references to the existing host from the VMM database. This should only be used as a last resort option after all other means have been exhausted.

  1. First, stop the VMMservice.
  2. Then, take a backup of the existing DB using SQL Management studio. (Right click on DB name, choose tasks, click on Back up, chose a full backup).
  3. Now, right click on table tbl_ADHC_Host and select view or open rows.
  4. Click on the SQL button from the tool bar to get the SQL query for the view.
  5. In there, start pasting the commands below one by one and verifying they executed correctly. (To execute, you can highlight the command and press F5 or press the “!” symbol).

DELETE FROM tbl_ADHC_HostNetworkAdapter WHERE (HostID = ‘85099616-fdc8-4f85-a702-979a4251f050’)
DELETE FROM tbl_ADHC_HostNetworkAdapter WHERE HostID=’8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘
DELETE FROM tbl_ADHC_VirtualNetwork WHERE (HostID = ‘85099616-fdc8-4f85-a702-979a4251f050’)
DELETE FROM tbl_ADHC_VirtualNetwork WHERE (HostID = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_HostVolume WHERE (HostID = ‘85099616-fdc8-4f85-a702-979a4251f050’) OR (HostID = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_HostDisk WHERE (HostID = ‘85099616-fdc8-4f85-a702-979a4251f050’) OR (HostID = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_WLC_PhysicalObject WHERE (HostId = ‘85099616-fdc8-4f85-a702-979a4251f050’) OR (HostId = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_WLC_VObject WHERE (HostId = ‘85099616-fdc8-4f85-a702-979a4251f050’) OR  (HostId = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_Host WHERE (HostID = ‘85099616-fdc8-4f85-a702-979a4251f050’) OR  (HostID = ‘8cfff5ad-0990-4a92-bd6d-4d24190e5d5a ‘)
DELETE FROM tbl_ADHC_ClusterDisk WHERE (ClusterID = ‘1148853c-cde3-45d2-82ee-bb04259d6a79’)
DELETE FROM tbl_ADHC_HostCluster WHERE (ClusterID = ‘1148853c-cde3-45d2-82ee-bb04259d6a79’)
DELETE FROM tbl_ADHC_AgentServerRelation WHERE (AgentServerID = ‘648e977e-d10e-40b6-aca2-d9d2dc63b790’)
DELETE FROM tbl_ADHC_AgentServer WHERE (ComputerName = ‘Server_Node1’)
DELETE FROM tbl_ADHC_AgentServer WHERE (ComputerName = ‘Server_Node2’)

6.  Now start the vmmservice and open the VMM console.

Advertisements
  1. Islam Gomaa
    March 30, 2013 at 4:11 am

    this doesnt work Ya mohamed
    islam Gomaa

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: