Archive

Archive for March, 2011

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.

Service Manager Enums, Classes and Relationship classes

March 5, 2011 Leave a comment

If you’ve had to use the CSV connector to import data and needed to know the enums for your list entries, or if you have manually authored a Management Pack and needed to know what classes or relationship classes to use, these tools may be helpful.  They retrieve the enums, classes and relationship classes for all management packs in your Service Manager database.

I have attached the VS 2008 project files if you are interested in the code.  For the executable, simply go to the <Project>\bin\debug folder.  All three executables have the same command line parameters:

-s <ManagementServer> [-d <domain> -u <username> -p <password>]

The -d -u -p parameters are required only if you are running the executable with non privileged or non trusted domain/workgroup account.

I suggest redirecting the output to a csv file because the data is comma delimited, with column headers.  E.g. executable.exe > output.csv

Enums

SMEnums.zip

The executable (SMEnums.exe) produces these comma separated columns:
EnumName, EnumId, EnumDisplayName, EnumParentId, MPName, MPDisplayName, MPId, MPKeyToken, MPVersion

Classes

SMClasses.zip

The executable (SMClasses.exe) produces these comma separated columns:
ClassId, ClassName, ClassDisplayName, MPName, MPDisplayName, MPVersion, MPKeyToken

Relationship Classes

SMRelClasses.zip

The executable (SMRelClasses.exe) produces these comma separated columns:
ClassId, ClassName, ClassDisplayName, MPName, MPDisplayName, MPVersion, MPKeyToken

Categories: Service Manager Tags: ,