create nonclustered index ManagedElement_ManagedElementTypeGuid_IX on [ManagedElement](ManagedElementTypeGuid)
go

/*
	   select 
'delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = ' + quotename(ManagedElementAttributeTypeGuid,'''') + '
g-o
'
                --ManagedElementAttributeType
	     from 
		       dbo.ManagedElementAttributeType 
		where
				ManagedElementTypeGuid in 
				(
					 'F58F87D0-3906-4065-8A45-CF3AE7801B9E'
					,'59001058-9DCC-4341-907D-4056BCF6E418'
					,'582385EC-AB5B-4C93-B0CC-18F51B3A4B07'
				)
*/

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'ECCC8DE3-EF5D-4016-B255-0C7ED07177EA'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'E5AC717F-4E60-4A6A-A231-0FDC5EC71ADF'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'A03AB0E0-E730-4AB0-AA34-17D1DAD46099'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '704FA080-F725-4CFC-A6E9-182BAC59D7B6'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '058FD44D-7C05-4D37-8D4C-18C57BC5B392'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '023AA9C6-37AB-4C6E-B02A-1D6A734742F2'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '2C995785-BC92-4F18-97ED-1D73DBFE3188'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '7011BC1B-BD9F-46E5-9C9B-21D7B56B68FE'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '1A454103-D41C-4D8A-AF07-24F5C4D8E4FB'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'F11479CC-11DF-453D-882B-258D58566051'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '6C05B405-45C1-412B-B5F6-2820338F7161'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '6DD3ABF7-2983-4624-82C0-2ABE18FECA18'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '4EBD356B-1E30-4A09-8B45-31505A1215DF'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '2A8297B3-2CA9-45E7-8113-33DBB994E5D2'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '803C7D13-CD95-4EA6-9ED7-351930E45DC3'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '754D6300-D39E-4EC2-AD29-3E128A635D29'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'C7210E44-5B20-4769-8869-4279D7FC62C7'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '5CAC016B-C28F-4B61-B729-4B3AF94386B8'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '7D15963C-95EB-48AE-8230-4FAD097FE77A'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'D7A68818-8350-4FCD-92F0-5869F3250738'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '4DF08AC1-E05B-4C43-B30D-65D3BC9D142A'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'D6889A89-898B-4873-BC94-6A1397D423C0'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'A8A3709D-4B87-49F2-A0A2-6AD0DAD0EAE6'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'E656A0D5-BDAD-4C6D-A462-6C30A5AC2AED'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '52CAED6D-D9FB-4EF4-9C2F-6D15087653FB'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '90BD91FD-5E0F-40FC-82BD-727D72524B5B'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'FEB09571-A25F-4DA7-879D-7B36612FD52D'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'AEF49FFD-D10D-48DC-8ADC-7BD945EB6749'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'DDE3594C-2EBA-4822-BC92-7C96801700B1'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'B1C24F87-8073-4D07-A486-8052CB35D7D9'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'E2C01E86-143A-475B-BD2C-81729ECC4C43'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'D36A660C-3022-4F67-9E71-835ED2C1F71C'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '9FFF45E9-3E42-4496-854D-8720E28AB361'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '8585849A-1D50-41CF-9ABF-87F3F424C117'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '64A1B716-FC6B-4A9E-9BAD-88CA03A6150E'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'BBADC5F9-1DEE-4B67-8BFC-96E1EE79CFB7'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'A9DC227B-0DD4-4D52-B1E7-9DC50135D425'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '9EE9EDED-0325-4230-8371-A02A23739361'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '782B929F-2414-458F-9C55-A8910054EF40'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'F3A41267-9F74-4A0D-A01B-ABD8E5B69347'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'B75DC091-1A52-45BA-B0D3-C4A2B16FDD1C'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '9E642557-0874-481B-9FC6-C573C5E0ACB8'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '05511440-0604-401F-905A-CDD599FA826B'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '0D8C50C1-D26D-4632-BF4C-CDF464FDE1BD'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '9A6A6273-FE57-4DE0-94E9-D80752976B1C'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'D20FBA12-0D7F-4434-9A2C-D84F20F9CCFE'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'AC4572AE-0778-40D3-95DF-DE5524DA2B6F'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'C0666FEF-E866-40AC-86D7-E6288FDFC970'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '71B892FF-6098-4D50-99D7-E6DC5275FC1A'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '954679A3-2862-4718-9FAA-EA33AEB38313'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'A39483FC-3B03-44F8-BA2D-EAE5C7981A56'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '8867DA24-256F-4D8A-8ED8-ED4E74BB6109'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '68F9A230-2818-42EF-9995-EE3215AB1373'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '0F49C1A6-FE99-460E-BD43-EE7FC3920557'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '674509B8-D9BB-4A26-ADED-F08DF6350315'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = '88E59285-B48C-4E84-AAB7-F6923369C27D'
go

delete ManagedElementAttributeData where ManagedElementAttributeTypeGuid = 'C0A4F8F1-5512-46DE-8643-FD8049F01721'
go



/*
	   select 
'delete ManagedElement where ManagedElementTypeGuid = ' + quotename(t.ManagedElementTypeGuid,'''') + '
g-o
'
	     from 
		       dbo.ManagedElementType t
		where
				ManagedElementTypeGuid in 
				(
					 'F58F87D0-3906-4065-8A45-CF3AE7801B9E'
					,'59001058-9DCC-4341-907D-4056BCF6E418'
					,'582385EC-AB5B-4C93-B0CC-18F51B3A4B07'
				)
*/

delete ManagedElement where ManagedElementTypeGuid = '582385EC-AB5B-4C93-B0CC-18F51B3A4B07'
go

delete ManagedElement where ManagedElementTypeGuid = '59001058-9DCC-4341-907D-4056BCF6E418'
go

delete ManagedElement where ManagedElementTypeGuid = 'F58F87D0-3906-4065-8A45-CF3AE7801B9E'
go

