If you are not already familiar with modeling concepts please see this blog post first:
http://blogs.technet.com/b/servicemanager/archive/2010/04/05/modeling-in-system-center-service-manager.aspx
When you define a property on a class you need to choose a data type for that property. Sometimes this is obvious – if you are going to store a date property value choose the datetime data type. If you are going to be storing a true/false value choose a Boolean value. This blog post will provide a comprehensive explanation of the different data types that are available to help you choose which one is right to store your data.
These are the data types as defined by the 1.1 version of the MP Schema:
<xsi:simpleType name="ManagementPackEntityPropertyTypes"> <xsi:restriction base="xsd:string"> <xsi:enumeration value="int"/> <xsi:enumeration value="decimal"/> <xsi:enumeration value="double"/> <xsi:enumeration value="string"/> <xsi:enumeration value="datetime"/> <xsi:enumeration value="guid"/> <xsi:enumeration value="bool"/> <xsi:enumeration value="enum"/> <xsi:enumeration value="richtext"/> <xsi:enumeration value="binary"/> </xsi:restriction> </xsi:simpleType>
They are the same data types as found in the version 1.0 MP schema used in SCOM/SCE 2007 (including R2) except that there are three new data types (highlighted) in the 1.1 version of the schema used in SCSM. SCOM v.Next will pick up those new data types when it adopts the newest version of the common MP schema.
Each data type value results in a column being created in a SQL Server database table. That column in the SQL Server database table has to be of a SQL Server data type. This is how the mapping works:
MP Schema Data Type
SQL Server Column Data Type
Notes
-2^31 (-2,147,483,648)
to
2^31-1 (2,147,483,647)
4 bytes
Precision: 38 17 bytes
- 1.79E+308
-2.23E-308
,0,
and
2.23E-308
1.79E+308
Precision: 53
8 bytes
Some best practices: