--ManagedElementType
INSERT INTO ManagedElementType (ManagedElementTypeGuid, TypeName, IsSingleInstance, TableName, ManagedElementGuidColumnName, ME2CategoryID, SchemaName, IsForSite)
	select 'CE05B42A-6058-48DA-8F02-0CDBF2DEDE35', 'OpenPortInfo', 0, 'Security_OpenPortInfo', 'OpenPortInfoGuid', 7, NULL, 0
	where not exists (select * from ManagedElementType where ManagedElementTypeGuid = 'CE05B42A-6058-48DA-8F02-0CDBF2DEDE35')
GO
--ManagedElementAttributeType
INSERT INTO ManagedElementAttributeType (ManagedElementAttributeTypeGuid, ManagedElementTypeGuid, AttributeName, IsKey, IsMonitored, DataType, IsArray, SqlDataType, [DataLength], IsIdentity, IsPKMember, UnitOfMeasure)
	select 'AE81177C-A7AD-4D2C-8F58-2AA9EB2937E7', 'CE05B42A-6058-48DA-8F02-0CDBF2DEDE35', 'Port', 1, 1, 'System.Int32', 0, 'int', null, 0, 0, null		
	where not exists (select * from ManagedElementAttributeType where ManagedElementAttributeTypeGuid = 'AE81177C-A7AD-4D2C-8F58-2AA9EB2937E7')

GO
INSERT INTO ManagedElementAttributeType (ManagedElementAttributeTypeGuid, ManagedElementTypeGuid, AttributeName, IsKey, IsMonitored, DataType, IsArray, SqlDataType, [DataLength], IsIdentity, IsPKMember, UnitOfMeasure)
	select '605F1595-407C-4118-BF0B-7B329A253E40', 'CE05B42A-6058-48DA-8F02-0CDBF2DEDE35', 'Protocol', 0, 1, 'System.String', 0, 'nvarchar', 300, 0, 0, null		
	where not exists (select * from ManagedElementAttributeType where ManagedElementAttributeTypeGuid = '605F1595-407C-4118-BF0B-7B329A253E40')
GO

INSERT INTO ManagedElementAttributeType (ManagedElementAttributeTypeGuid, ManagedElementTypeGuid, AttributeName, IsKey, IsMonitored, DataType, IsArray, SqlDataType, [DataLength], IsIdentity, IsPKMember, UnitOfMeasure)
	select '79B5D36E-9798-4BB6-8BC7-11653348DCAE', 'CE05B42A-6058-48DA-8F02-0CDBF2DEDE35', 'Description', 0, 1, 'System.String', 0, 'nvarchar', 300, 0, 0, null		
	where not exists (select * from ManagedElementAttributeType where ManagedElementAttributeTypeGuid = '79B5D36E-9798-4BB6-8BC7-11653348DCAE')
GO