DELETE FROM ManagedElementAttributeType WHERE ManagedElementAttributeTypeGuid in ( 
'E9CEB28A-5639-42FE-B346-9E01B16E828C'
,'5CE8BED6-3170-414C-B5D3-98A5A907427C'
,'AE211720-4FD8-4ACF-9B03-3B3DA97AA62C'
,'6A01C707-D76E-41FF-B18B-5E8A446ED8D8'
,'766C892E-C999-4ACD-9381-C9E722536FF8'
,'FC3BA133-C508-48CE-A6D1-0E53F45EA0C5'
,'02EECA4C-3AD2-4D44-B5E0-452DEAEB15D8'
,'8E6E3BCA-7496-4E27-A2C3-88A11C5D3375'
,'69ABDBEA-6E7C-4ED5-B97F-8619121BB163'
,'A9EA1CD7-D535-414D-95ED-B9175653E1FB'
,'68A1C385-7F82-429B-A114-C80B7EC12031'
,'FB08C4FD-EFE9-4E76-8DCE-CE35322B47D1'
,'DEE95258-BE43-4D37-A89D-E59E37FF5907'
,'E4C49FAB-35DC-4C7A-82EE-8E6E67E8564E'
,'C167CF2E-DB12-4B9B-80F1-13C8A5CB1447'
,'356BC7CF-CC63-42B3-94EC-63426D0C974B'
,'B12A313E-F1F9-4E7F-B5FC-6F036A607D4E'
,'29851059-6AB3-41E3-921C-DA7392D19707'
,'5B31300C-AC8F-4560-925D-C839C4869FFE'
,'1F083CDE-DDC7-4E91-931E-4D077CF67AAA'
,'BF5FB547-8CC7-4C0C-B7CD-36891E81F176'
)
GO

--Delete AV_VirusVault Managed Element information as well as the table itself
DELETE FROM ManagedElementAttributeType WHERE ManagedElementTypeGuid = '07C680FD-F608-471F-9D18-77F3ACFA0C78'
GO
DELETE FROM ManagedElementType WHERE ManagedElementTypeGuid = '07C680FD-F608-471F-9D18-77F3ACFA0C78'
GO

-- Delete AVCC_device_services Managed Element information as well as the table itself
DELETE FROM ManagedElementAttributeType WHERE ManagedElementTypeGuid = 'DCBF7942-AC4C-40AB-9CE3-DF50916F5A91'
GO
DELETE FROM ManagedElementType WHERE ManagedElementTypeGuid = 'DCBF7942-AC4C-40AB-9CE3-DF50916F5A91'
GO

-- Rename Managed Element table AVCC_device_subservice_versions to AvastAgentSubserviceVersion
UPDATE ManagedElementType 
SET [TypeName] = 'AvastAgentSubserviceVersion'
   ,[TableName] = 'AvastAgentSubserviceVersion' 
WHERE ManagedElementTypeGuid = '7957A50B-37AD-484E-ABD2-DDE76F1A340A'
GO