Archive

Posts Tagged ‘Enum’

Quick Enum from database query

March 5, 2011 1 comment

If you want to quickly get the enumeration of a display string, you can run the following query on the ServiceManager database

select enum.EnumTypeId, enum.EnumTypeName, disp.DisplayName,
mp.MPName, mp.MPFriendlyName
from EnumType enum
join DisplayStringView disp on enum.EnumTypeName = disp.ElementName
join ManagementPack mp on enum.ManagementPackId = mp.ManagementPackId
where disp.LanguageCode='ENU'
and DisplayName = 'xxx'

Where ‘xxx’ is the display name such as ‘Auto Resolved by Problem’.  The above query of course is for English display strings.  You can replace ‘ENU’ with the language code of any other supported language.