Although SMS accepts the full DMI 4.5 syntax, the SMS MIF parser does not use some fields, and the SMS system may use the information in a way that differs from the DMI 4.5 specification.
SMS handles these data types in the following manner:
Therefore, values exceeding 32 bits will not be correctly evaluated. Likewise, 32-bit unsigned values above 0x7FFFFFFF will be variously interpreted as unsigned 32-bit values or signed 32-bit values, depending on the context. However, the MIF parser will forward these values to other components as signed 32-bit integers.
Because Microsoft® SQL Server™ places a limit of 255 characters on strings, any strings longer than 255 characters in the MIF will be truncated. However, there is no string length limitation in the syntax itself for attribute values. It is recommended that strings not exceed 255 characters in length, and that they not contain embedded NULL characters through an escape sequence.
The enumeration string is preserved as a database item. Enumeration types take on the string type when the MIF has been parsed and evaluated. Enumeration types can be specified by using either the integer symbol or the enumeration string itself in all contexts where an attribute value is required.
These simplifications are for compatibility with SQL Server data types, and to compensate for the fact that the MIF is being compiled and transmitted to a remote database where the original hardware context of the MIF is lost. Also, there is no purpose served (for SMS inventory purposes) in distinguishing between some of these types. Finally, SQL Server supports a different set of types—so the SMS MIF compiler must map the DMI types to suitable SQL Server types, and the mapping is not necessarily on a one-to-one basis.
SMS uses the PRAGMA keyword to send commands between components. The PRAGMA statement can be used in a MIF group definition. The PRAGMA statement specifies a string that contains a command. The PRAGMA string is case-insensitive.
For example, the following PRAGMA statement tells the Inventory Processor and Inventory Dataloader components to update a group by using the information in the group definition specified in the MIF file:
PRAGMA = "SMS:Update"
If no PRAGMA is specified, the command is "Add" by default.
PRAGMA | Meaning |
---|---|
SMS:Add | Adds the group to the computer's inventory in the database. |
SMS:Update | Updates the group in the database with the information in the Delta-MIF file. |
SMS:Delete | Removes the group from the computer's inventory in the database. |
For SMS, an Unsupported keyword applied to an attribute value causes that attribute to be specially marked. The MIF parser will retain the Unsupported tag; however, the SMS Inventory Processor will ignore such attributes, treating them as though they were not present in the MIF file.
For example, if the current date is November 11, 1995, the value 1995**01130000.000000+000 would be processed as 1:00 P.M. November 1, 1995 (** is replaced by 11, the current month).
With DMI 4.5, you can use asterisks to avoid specifying a part of a date. SMS requires that a date value be a complete date value because Microsoft SQL Server cannot store partial date values.
An attribute that contains all asterisks will be considered a NULL or blank date in the SMS database.
You should be careful when using escape characters. For example, a NULL in the middle of a string "abc\0abc" causes SMS to interpret the string as having a length of only three characters. Although the parser supports a stream of bytes by this mechanism, SMS truncates the string when it detects an escape NULL.
Also note that how the escape character is stored in the SMS database depends on the character set used by the SQL Server containing the database. How the escape character is displayed depends on the code page used by the computer running the SMS Administrator.
If an attribute with a String data type does not have a declared string length, the SMS Inventory Processor will use the string length of the value that is specified for the first occurrence of the attribute. This string length will be used as the declared string length of the attribute. Any attributes of the same type will use the declared string length as the string length of the attribute.
If no string length is declared for an attribute, the Inventory Processor will use the following rules to set the string length (in the specified order):
The exception is any Name statement for a component, group, attribute, path, enum, or table. These statements have a maximum length of 255 characters.
If the group containing this unsized attribute is part of a group template, then the length of the default string becomes the defining size, as if the string had been declared with a length of that value. So, if you declare no default string size and no default string value, this sets the maximum string length to zero in the table declarations.
If a string length is not declared, the default string value's length will be used implicitly as the maximum length, and any initializers in a table may not exceed this length.