Skip to content

Instantly share code, notes, and snippets.

@ycku
Last active April 8, 2020 02:52
Show Gist options
  • Save ycku/ce38a3844cbe1c51f33b90800c74c2ca to your computer and use it in GitHub Desktop.
Save ycku/ce38a3844cbe1c51f33b90800c74c2ca to your computer and use it in GitHub Desktop.
[VMware Horizon] Desktop Composer Fault: Virtual Machine with Input Specification already exists
DECLARE @vmname VARCHAR(20)
set @vmname='VMXX-001'
delete FROM [vdi7s_composer].[dbo].[SVI_VM_NAME] where NAME=@vmname
delete FROM [vdi7s_composer].[dbo].[SVI_COMPUTER_NAME] where NAME=@vmname
delete FROM [vdi7s_composer].[dbo].[SVI_TASK_STATE] where SIM_CLONE_ID=(select id FROM [vdi7s_composer].[dbo].[SVI_SIM_CLONE] where VM_NAME=@vmname)
delete
FROM [vdi7s_composer].[dbo].[SVI_SC_PDISK_INFO] where PARENT_ID=(select id FROM [vdi7s_composer].[dbo].[SVI_SIM_CLONE] where VM_NAME=@vmname)
delete
FROM [vdi7s_composer].[dbo].[SVI_SC_BASE_DISK_KEYS] where PARENT_ID=(select id FROM [vdi7s_composer].[dbo].[SVI_SIM_CLONE] where VM_NAME=@vmname)
delete
FROM [vdi7s_composer].[dbo].[SVI_SIM_CLONE] where VM_NAME=@vmname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment