Host-based backup of VMware vSphere VMs.
cfizz34
Expert
Posts: 128
Liked: 14 times
Joined: Jul 02, 2010 2:57 pm
Full Name: Chad
Contact:

Re: Removing ESXi host from Infrastructure pane

Post by cfizz34 »

DECLARE @uniqueID uniqueidentifier
SET @uniqueID = '00000000-0000-0000-0000-000000000000'

delete from [hosts] where id = @uniqueID
delete from [hosts] where parent_id = @uniqueID
delete from [folder_host] where host_id = @uniqueID
delete from [BObjects] where host_id = @uniqueID
--delete from [ssh_creds] where host_id = @uniqueID
delete from [soap_creds] where host_id = @uniqueID
delete from [Backup.Model.Storages] where host_id = @uniqueID
--delete from [HostComponents] where host_id = @uniqueID
delete from [Backup.Model.BackupTaskSessions] where object_id = @uniqueID
delete from [Backup.Model.OIBs] where object_id = @uniqueID
delete from [ObjectsInJobs] where object_id = @uniqueID
delete from [Backup.Model.Backups] where job_id = @uniqueID
delete from [Backup.Model.JobSessions] where job_id = @uniqueID
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Removing ESXi host from Infrastructure pane

Post by veremin »

Thanks for sharing, but to be on the safe side I would still ask for support team assistance instead of removing records from database manually. Or at least take a configuration backup prior to running the given queries. Thanks!
cfizz34
Expert
Posts: 128
Liked: 14 times
Joined: Jul 02, 2010 2:57 pm
Full Name: Chad
Contact:

Re: Removing ESXi host from Infrastructure pane

Post by cfizz34 » 1 person likes this post

That was given to me from support. But yes, always have a backup.
Post Reply

Who is online

Users browsing this forum: Stabz and 56 guests