Pages

Tuesday, November 23, 2010

VMware View 4.5 - Removing the linked clone references from the View Composer Database

In an earlier post I referenced Manually deleting linked clones or stale virtual desktop entries from VMware View Manager. While following that KB my self I found removing references from the View Composer database to be to much of a manual process and double so when removing multiple machines in a pool. I went looking on line and found nearly what I wanted from wanted from andga.

I made just a few changes to what andga wrote so that it would work work with the BaseName and will remove the references from all tables based on the name. By using sql 'like' and '%' it finds all the matching VM and cleans them all up at once.

DECLARE @vmdelete varchar(20);
set @vmdelete = 'VM_BaseName%';

delete from SVI_VM_NAME where NAME like @vmdelete
delete from SVI_COMPUTER_NAME where NAME like @vmdelete
delete from SVI_TASK_STATE where SIM_CLONE_ID in (SELECT ID FROM SVI_SIM_CLONE WHERE (VM_NAME like @vmdelete))
delete from SVI_SC_BASE_DISK_KEYS where PARENT_ID in (SELECT ID FROM SVI_SIM_CLONE WHERE (VM_NAME like @vmdelete))
delete from SVI_SC_PDISK_INFO where PARENT_ID in (SELECT ID FROM SVI_SIM_CLONE WHERE (VM_NAME like @vmdelete))
delete FROM SVI_SIM_CLONE WHERE (VM_NAME like @vmdelete)

After using this or manually editing the SQL in the View Composer DB be sure to restart the VMware View Composer Service.

Links

1 comment:

  1. Various other invaluable includes may just be related to that Resident aqualand chronograph rolex replica. Consists of diver's running watches, they are really water-resistant close to 300 metres amount and provide an important rush way in addition demonstrating to the usual precious time. An important rush way gauge is without a doubt situated on the allowed to remain half belonging to the call. Afternoon and even meeting is without a doubt showcased in the best hublot replica sale. Various types of that Resident Promaster Diver running watches enjoy the the airwaves restrain include allowing it to auto-magically synchronize by themself considering the next atomic time clock. Though when you're nowhere fast nearby a powerful atomic time clock, that sit back and watch will be yourself establish to point out to the needed precious time. Polished Resident skyhawk running watches are located in rolex replica units; various contain iron outer shell components when include that rocky and also carbon fibre. That sit back and watch is known for a sapphire precious stone through anti reflective cellular lining it is so nothing invulnerable. Most of them are sizeable designer watches assuring wonderful purity possibly even on a way away. Within citizenwatchesonline. com, you stumble upon a major collecting polished and even inventive Resident Promaster Diver running watches, as a result relax and take a rolex replica uk. Lets us facial skin the application women's: fellas achieve a whole lot of pieces of paper rado replica sale fun-based activities and even either that doctor needs to get to implement ones own accents simply because successful programs.

    ReplyDelete

Please leave a comment; someone, anyone!