<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>JIMMY HARPER'S OPERATIONS MANAGER BLOG</title><link>http://blogs.technet.com/jimmyharper/default.aspx</link><description>Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Noisy DBCC Rule in the SQL Management Pack</title><link>http://blogs.technet.com/jimmyharper/archive/2009/10/01/noisy-dbcc-rule-in-the-sql-management-pack.aspx</link><pubDate>Thu, 01 Oct 2009 08:39:20 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3284259</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3284259.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3284259</wfw:commentRss><description>&lt;p&gt;The SQL Server Management Pack has a rule, targeted at SQL 2000/2005/2008 DB Engine named “DBCC executed found and repaired errors”.&amp;#160; This rule monitors for Event ID 8957 in the Application Log, logged by the SQL Service.&amp;#160; Here is the criteria for the rule:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb.png" width="826" height="271" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The problem with this is that you will see this Event logged, even when DBCC did not find or fix any errors…here’s an example:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb_1.png" width="389" height="304" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, this could result in a lot of alerts.&amp;#160; Also, this rule generates an Informational alert by default, so if the event did indicate that errors were found, it would not generate a Warning or Critical alert.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We can change this by disabling the default rule and creating a new one.&amp;#160; The new one should generate a Warning or Critical alert only if the DBCC event indicates that errors were found.&amp;#160; We have two ways that we can do this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;&lt;font size="4"&gt;The Easy Way&lt;/font&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;SQL 2005/2008:&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div&gt;Set an Override to disable the built-in “DBCC executed found and repaired errors” rules targeted at SQL 2005/2008 DB Engine       &lt;br /&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;Create two separate rules, one targeted at SQL 2005 DB Engine and one targeted at SQL 2008 DB Engine.&amp;#160; The rule will be exactly the same as the original, but with additional criteria for “Event Description does not contain “found 0 errors””:&lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb_2.png" width="936" height="291" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Configure alerting as desired:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb_3.png" width="570" height="510" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;SQL 2000:&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Set an Override to disable the built-in “DBCC executed found and repaired errors” rules targeted at SQL 2000 DB Engine     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Create a new rule, targeted at SQL 2000 DB Engine.&amp;#160; The criteria will be a little different than SQL 2005/2008:&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb_4.png" width="973" height="534" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font size="4"&gt;&lt;strong&gt;The Harder, But Better, Way&lt;/strong&gt;&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I don’t like using Event Description in criteria if I don’t have to…using Parameters is less of a performance hit on the agent.&amp;#160; So, instead of using the above options with EventDescription, we can use parameters.&amp;#160; The parameters we are concerned with here are Parameter 8 (number of errors found) and Parameter 9 (number of errors repaired).&amp;#160; This is for SQL 2005/2008 only, I haven’t looked at the parameters for SQL 2000.&amp;#160; So, we can use the following criteria:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoisyDBCCRuleintheSQLManagementPack_898/image_thumb_5.png" width="924" height="310" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The reason that this is better is that the Agent doesn’t need to look through the full Event description of every 8957 event, it only needs to look at parameters 8 and 9.&lt;/p&gt;  &lt;p&gt;The reason that is is harder is because we’ll also have to edit the XML of the rule, since we are using Integers in the criteria.&amp;#160; See my previous blog post (from, like, an hour ago) on this &lt;a href="http://blogs.technet.com/jimmyharper/archive/2009/10/01/using-integers-and-other-non-string-data-types-in-rules-and-monitors.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So, we’ll need to export our custom MP, open it in a text editor and find the XML for the OR expression for Parameter 8 and Parameter 9.&amp;#160; Here is the XML:&lt;/p&gt;  &lt;p&gt;&amp;lt;Expression&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Or&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&amp;quot;String&amp;quot;&amp;gt;Params/Param[8]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&amp;quot;String&amp;quot;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&amp;quot;String&amp;quot;&amp;gt;Params/Param[9]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&amp;quot;String&amp;quot;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/Or&amp;gt;    &lt;br /&gt; &amp;lt;/Expression&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We’ll then need to change the “String” entries to “Integer”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Before:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;Expression&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Or&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;String&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;Params/Param[8]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;String&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;String&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;Params/Param[9]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;String&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/Or&amp;gt;    &lt;br /&gt; &amp;lt;/Expression&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;After:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;Expression&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Or&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;Integer&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;Params/Param[8]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;Integer&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;Integer&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;Params/Param[9]&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&lt;strong&gt;&lt;font color="#ff0000" size="2"&gt;&amp;quot;Integer&amp;quot;&lt;/font&gt;&lt;/strong&gt;&amp;gt;0&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/Or&amp;gt;    &lt;br /&gt; &amp;lt;/Expression&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Update the version of the MP, re-import it, and you should be good to go.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284259" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Management+Pack/default.aspx">Management Pack</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Rule/default.aspx">Rule</category></item><item><title>Using Integers and other “non-string” data types in Rules and Monitors</title><link>http://blogs.technet.com/jimmyharper/archive/2009/10/01/using-integers-and-other-non-string-data-types-in-rules-and-monitors.aspx</link><pubDate>Thu, 01 Oct 2009 07:19:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3284247</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3284247.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3284247</wfw:commentRss><description>&lt;p&gt;If you need to use any non-string data type in the criteria for custom Rules and Monitors, you’ll need to edit the XML in order for it to work properly.&amp;#160; By default, OpsMgr will treat everything as a String value and the Rule/Monitor will not work properly.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For example, I created a rule to watch for Event ID 1000 in the Application Log and throw an Alert if Parameter 1 is greater than 20.&amp;#160; Here is the Rule criteria:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_thumb.png" width="666" height="265" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_thumb_3.png" width="538" height="543" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Using Event Log Explorer (awesome tool for testing, get it &lt;a href="http://blogs.technet.com/momteam/archive/tags/EventLogExplorer/default.aspx"&gt;here&lt;/a&gt;), I generate Event 1000 with Parameter 1 set to 9:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_thumb_1.png" width="391" height="446" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I then received the following alert:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/UsingIntegersandothernonstringdatatypesi_147EE/image_thumb_4.png" width="671" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The reason I received this alert is that if OpsMgr is evaluating Parameter 1 as a String Value, then 9 would be greater than 20 (since 9 is greater than 2).&lt;/p&gt;  &lt;p&gt;To correct, this I’ll need to edit the XML of the rule to change the data type to Integer.&lt;/p&gt;  &lt;p&gt;So, I export the Management Pack that contains this Rule and look at the XML.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is the full XML of the Rule.&amp;#160; The expression that we are concerned with is highlighted in &lt;font color="#008000" size="3"&gt;&lt;strong&gt;green&lt;/strong&gt;&lt;/font&gt;, and the part we need to change is in &lt;font color="#ff0000" size="2"&gt;&lt;strong&gt;red&lt;/strong&gt;&lt;/font&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;Rule ID=&amp;quot;MomUIGeneratedRuleb80bc5a17ec4486185215843882c0046&amp;quot; Enabled=&amp;quot;true&amp;quot; Target=&amp;quot;MicrosoftWindowsLibrary6062780!Microsoft.Windows.Computer&amp;quot; ConfirmDelivery=&amp;quot;true&amp;quot; Remotable=&amp;quot;true&amp;quot; Priority=&amp;quot;Normal&amp;quot; DiscardLevel=&amp;quot;100&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;Category&amp;gt;Custom&amp;lt;/Category&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;DataSources&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DataSource ID=&amp;quot;DS&amp;quot; TypeID=&amp;quot;MicrosoftWindowsLibrary6062780!Microsoft.Windows.EventProvider&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ComputerName&amp;gt;$Target/Property[Type=&amp;quot;MicrosoftWindowsLibrary6062780!Microsoft.Windows.Computer&amp;quot;]/NetworkName$&amp;lt;/ComputerName&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LogName&amp;gt;Application&amp;lt;/LogName&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;And&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&amp;quot;UnsignedInteger&amp;quot;&amp;gt;EventDisplayNumber&amp;lt;/XPathQuery&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Equal&amp;lt;/Operator&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&amp;quot;UnsignedInteger&amp;quot;&amp;gt;1000&amp;lt;/Value&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&amp;quot;&lt;font color="#ff0000"&gt;String&lt;/font&gt;&amp;quot;&amp;gt;Params/Param[1]&amp;lt;/XPathQuery&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&amp;quot;&lt;font color="#ff0000"&gt;String&lt;/font&gt;&amp;quot;&amp;gt;20&amp;lt;/Value&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;&lt;/strong&gt;&lt;/font&gt;      &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/And&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/DataSource&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/DataSources&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;WriteActions&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;WriteAction ID=&amp;quot;Alert&amp;quot; TypeID=&amp;quot;Health!System.Health.GenerateAlert&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Priority&amp;gt;1&amp;lt;/Priority&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Severity&amp;gt;2&amp;lt;/Severity&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertOwner /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertMessageId&amp;gt;$MPElement[Name=&amp;quot;MomUIGeneratedRuleb80bc5a17ec4486185215843882c0046.AlertMessage&amp;quot;]$&amp;lt;/AlertMessageId&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameters&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;AlertParameter1&amp;gt;$Data/Params/Param[1]$&amp;lt;/AlertParameter1&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/AlertParameters&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Suppression /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom1 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom2 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom3 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom4 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom5 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom6 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom7 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom8 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom9 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Custom10 /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/WriteAction&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/WriteActions&amp;gt;    &lt;br /&gt;&amp;lt;/Rule&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To get this rule to work as expected, we’ll need to change &lt;font color="#ff0000" size="2"&gt;&lt;strong&gt;“String”&lt;/strong&gt;&lt;/font&gt; to &lt;font color="#ff0000" size="2"&gt;&lt;strong&gt;“Integer”&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Expression&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;SimpleExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;XPathQuery Type=&amp;quot;&lt;font color="#ff0000"&gt;Integer&lt;/font&gt;&amp;quot;&amp;gt;Params/Param[1]&amp;lt;/XPathQuery&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Operator&amp;gt;Greater&amp;lt;/Operator&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Value Type=&amp;quot;&lt;font color="#ff0000"&gt;Integer&lt;/font&gt;&amp;quot;&amp;gt;20&amp;lt;/Value&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ValueExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SimpleExpression&amp;gt;          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Expression&amp;gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So, I make the change to the XML, update the version number of the MP, and reimport it.&lt;/p&gt;  &lt;p&gt;I create the same event on the agent an no longer get alerted on it.&lt;/p&gt;  &lt;p&gt;The possible data types that can be used here are:&lt;/p&gt;  &lt;p&gt;&amp;quot;Boolean&amp;quot;   &lt;br /&gt;&amp;quot;Integer&amp;quot;    &lt;br /&gt;&amp;quot;UnsignedInteger&amp;quot;    &lt;br /&gt;&amp;quot;Double&amp;quot;    &lt;br /&gt;&amp;quot;Duration&amp;quot;    &lt;br /&gt;&amp;quot;DateTime&amp;quot;    &lt;br /&gt;&amp;quot;String&amp;quot;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3284247" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Monitor/default.aspx">Monitor</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Rule/default.aspx">Rule</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Criteria/default.aspx">Criteria</category></item><item><title>Overrides view in R2</title><link>http://blogs.technet.com/jimmyharper/archive/2009/09/26/overrides-view-in-r2.aspx</link><pubDate>Sat, 26 Sep 2009 09:04:42 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3283349</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3283349.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3283349</wfw:commentRss><description>&lt;p&gt;Here’s one of many good uses of the new Overrides view in OpsMgr 2007 R2.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I want to review overrides that I have set for Rules and Monitor that target the SQL 2005 DB and SQL 2005 DB Engine classes.&amp;#160; I’m mostly interested in Overrides that have been set enable/disable things and configure how often things run.&lt;/p&gt;  &lt;p&gt;In the Console, I go to Authoring\Overrides and scope to the desired classes:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb.png" width="632" height="559" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Within the view, I select “Personalize View”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb_1.png" width="1398" height="486" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I select Group Items By: Parameter, Then By: (none);&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb_2.png" width="722" height="472" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now I can see all of the parameters that I have overrides configured for, and make changes or delete them if needed:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb_3.png" width="1103" height="590" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb_4.png" width="1206" height="642" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/OverridesviewinR2_F10/image_thumb_5.png" width="1181" height="555" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3283349" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/R2/default.aspx">R2</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Override/default.aspx">Override</category></item><item><title>Exchange 2007 Synthetic Transactions against clustered Mailbox Servers may stop working</title><link>http://blogs.technet.com/jimmyharper/archive/2009/09/26/exchange-2007-synthetic-transactions-against-clustered-mailbox-servers-may-stop-working.aspx</link><pubDate>Sat, 26 Sep 2009 08:30:17 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3283348</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3283348.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3283348</wfw:commentRss><description>&lt;p&gt;Are you using the new Exchange 2007 Management Pack?&lt;/p&gt;  &lt;p&gt;Are you configuring the CAS and/or Mailflow synthetic transcactions?&lt;/p&gt;  &lt;p&gt;Are any of your target Mailbox servers clustered?&lt;/p&gt;  &lt;p&gt;If so, then you’ll want to verify that these transactions are actually running…and be sure to check it at least 12 hours after setting it up.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Here’s a very quick synopsis of the issue:&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;You create either CAS or Mailflow synthetic transactions where the target mailbox server is clustered &lt;/li&gt;    &lt;li&gt;The synthetic transactions are discovered and appear to be running fine…objects are healthy and we see perf data &lt;/li&gt;    &lt;li&gt;Within 12 hours, you notice that we are no longer seeing performance data from the transaction. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There is a discovery called “RMS Target Relationship Discovery” which runs every 12 hours on the RMS.&amp;#160; The purpose of this discovery is to create a relationship between the Exchange Synthetic Transaction object and the target Mailbox server.&amp;#160; The purpose of the relationship is so that when the Mailbox server is put into Maintenance Mode, the Transaction object will also go into MM (otherwise, the transactions would continue to run and would fail and go into an unhealthy state).&amp;#160; The problem is that when the target mailbox server is clustered, some core OpsMgr rules relating to cluster monitoring end up getting applied to the CAS server and essentially disabling the workflows that run these transactions.&amp;#160; I know that’s not an extremely technical explanation, but it’ll do for now.&amp;#160; Regardless, if the target mailbox server is clustered, the transactions will completely stop running within 12 hours.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Resolution:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To resolve this, we need to disable the “RMS Target Relationship Discovery” discovery and use Powershell to remove the discovered relationship from OpsMgr.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Here’s a visual look at the problem:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Use the wizard to create the transactions:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb.png" width="711" height="616" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;EXCAS.OpsMgr.net is my CAS server:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_1.png" width="722" height="497" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I am going to enable the Active Sync and OWA tests:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_2.png" width="725" height="625" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;EX07a is a standalone Exchange server, EX1V1 is a clustered mailbox server:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_3.png" width="717" height="619" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_4.png" width="721" height="621" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The discovery defaults to running every 24 hours, I changed it to 5 minutes for testing:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_5.png" width="630" height="537" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_6.png" width="683" height="713" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After giving the discoveries time to run (or just restarting the Health Service on the CAS server to force it), I go to the CAS Synthetic Transaction State view in the console and see that the objects are discovered.&amp;#160; I have an object for each Transaction to each Mailbox server (pay no attention to the unhealthy states in the screen shot, they are unrelated to this issue).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_16.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_7.png" width="1231" height="589" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Looking in the performance view, I can see that I am receiving performance data from the transactions to both Mailbox servers (I configured the transactions to run every 1 minute, default is every 15 minutes):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_18.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_8.png" width="1177" height="660" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After the RMS Target Relationship discovery runs, we are no longer seeing data from the transaction to the clustered mailbox server (the red line).&amp;#160; Normally you would see this within 12 hours of the transactions being created…I sped it up to run sooner to reproduce it easily:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_22.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_10.png" width="684" height="505" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Also, the state of the transaction object will remain the same as it was before the RMS Target Relationship discovery ran (until the problem is fixed)….if it was Healthy then, it will stay Healthy….if it was Unhealthy, it will stay Unhealthy.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To resolve this we must do the following two things (both MUST be done):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Create an Override to disable the “RMS Target Relationship Discovery” discovery&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to Authoring\Object Discoveries&lt;/p&gt;  &lt;p&gt;Select “View all targets&amp;quot;&lt;/p&gt;  &lt;p&gt;Scope to “Exchange 2007 CAS Connectivity”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_26.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_12.png" width="637" height="547" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Select the “RMS Target Relationship Discovery” object – Overrides – Override the Object Discovery – For all objects of class: Root Management Server:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_28.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_13.png" width="974" height="593" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Set an Override for Enabled = False:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_30.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_14.png" width="692" height="301" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now that the override is disabled, we will need to remove the relationships that were discovered by it.&amp;#160; To do this, we’ll use the Powershell command Remove-DisabledMonitoringObject.&amp;#160; Note that you MUST set the Enabled=False override mentioned above in order for this to work (if the discovery is not explicitly disabled, the Powershell command will not remove the objects discovered by it).&amp;#160; For more info on the Remove-DisabledMonitoringObject command, see Jonathan’s blog on it &lt;a href="http://blogs.technet.com/jonathanalmquist/archive/2008/09/14/remove-disabledmonitoringobject.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Just open the OpsMgr Command Shell and run Remove-DisabledMonitoringObject:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_32.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_15.png" width="776" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once the relationship is removed, the Transaction starts running again:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_36.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Exchange2007SyntheticTransactionsagainst_65D/image_thumb_17.png" width="980" height="526" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Bottom Line:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;If you use the Exchange 2007 Synthetic Transactions for CAS or Mailflow tests against a Clustered Mailbox server, the transactions will stop running within 12 hours.&lt;/li&gt;    &lt;li&gt;To fix this, you must disable the “RMS Target Relationship Discovery” discovery and run the Remove-DisabledMonitoringObject Powershell cmdlet.&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3283348" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Management+Pack/default.aspx">Management Pack</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Health Service problem on Windows 2000 Agent</title><link>http://blogs.technet.com/jimmyharper/archive/2009/08/25/health-service-problem-on-windows-2000-agent.aspx</link><pubDate>Tue, 25 Aug 2009 20:15:15 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3276746</guid><dc:creator>jimmyharper</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3276746.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3276746</wfw:commentRss><description>&lt;p&gt;I recently ran into an interesting issue with a customer.&amp;#160; A Windows 2000 Agent (running OpsMgr SP1) was not able to process configuration due to problems creating/using the self-signed certificate that the Health Service uses (this is not a Gateway or DMZ scenario, this is the certificate that all agents create and use).&amp;#160; At first, we were seeing the following errors in the OpsMgr Event Log:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000"&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1220      &lt;br /&gt;Description:       &lt;br /&gt;Received configuration cannot be processed. Management group &amp;quot;&amp;lt;MANAGEMENT_GROUP_NAME&amp;gt;&amp;quot;. The error is Cannot find the certificate and private key for decryption.       &lt;br /&gt;(0x8009200B). &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000"&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 21021      &lt;br /&gt;Description:       &lt;br /&gt;No certificate could be loaded or created.&amp;#160; This Health Service will not be able to communicate with other health services.&amp;#160; Look for previous events in the event log for more detail.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After removing/reinstalling the agent, the Health Service would not start, and the following error was seen in the System Event Log:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000"&gt;Event ID:&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 7024      &lt;br /&gt;Description:       &lt;br /&gt;The OpsMgr Health Service service terminated with service-specific error 2148073494.&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This error maps to &amp;quot;Keyset does not exist&amp;quot;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This looks to me like the Health Service is having problems creating its self-signed certificate.&amp;#160; To investigate this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Check to see if we have the certificate in the certificate store:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Start – Run – MMC.exe &lt;/li&gt;    &lt;li&gt;File – Add/Remove Snap-in &lt;/li&gt;    &lt;li&gt;Add – Certificates – Add &lt;/li&gt;    &lt;li&gt;Computer Account – Next – Local Computer – Finish &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Here’s what it looks like when the cert is there:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/HealthServiceproblemonWindows2000Agent_AC49/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/HealthServiceproblemonWindows2000Agent_AC49/image_thumb_1.png" width="767" height="374" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If the certificate is there and we still think we’re having problems with it, there’s no harm in deleting it….it should be re-created when the Health Service starts.&amp;#160; In our case, since we had uninstalled the agent, the certificate was removed.&amp;#160; When we tried to start the Health Service, it was failing to create the certificate.&amp;#160; So, the next step is to verify that the Health Service is running under the context of the Local System account:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/HealthServiceproblemonWindows2000Agent_AC49/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/HealthServiceproblemonWindows2000Agent_AC49/image_thumb.png" width="410" height="462" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If it is, then the next step is to verify that the System and Administrator accounts have Full Control of the following directories:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;%System Drive%\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys &lt;/p&gt;  &lt;p&gt;%System Drive%\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\S-1-5-18&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Also, verify that the Administrators group is the owner of these directories.&amp;#160; This is necessary for the Local System account to be able to create the certificate.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, everything above checked out fine in my customer’s environment.&amp;#160; While researching this, I came across another customer case where some other service was failing to create a certificate because a service named “Protected Storage Service” was not running.&amp;#160; I tested on a Windows Server 2003 Agent and could not reproduce the problem…we created the self-signed cert just fine without the Protected Storage service running.&amp;#160; Then, I remembered that my customer’s problem was on a Windows 2000 Agent, and the other customer case I was reading was quite old, so likely from Windows 2000.&lt;/p&gt;  &lt;p&gt;Anyway, we checked the Protected Storage Service and it was disabled.&amp;#160; Enabled and start it and the Health Service started without error, created its certificate, and was talking to the Management Server in no time.&lt;/p&gt;  &lt;p&gt;So, if you have any of the above errors, check to verify that the Protected Storage Service is started.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3276746" width="1" height="1"&gt;</description></item><item><title>Service Monitors – What does the “State” value mean?</title><link>http://blogs.technet.com/jimmyharper/archive/2009/08/12/service-monitors-what-does-the-state-value-mean.aspx</link><pubDate>Wed, 12 Aug 2009 02:00:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3272546</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3272546.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3272546</wfw:commentRss><description>&lt;p&gt;When you create a Service Monitor in OpsMgr 2007, we get an alert / state change when the service is not running, but this does not necessarily mean that the service is “stopped”.&amp;#160; The monitor attempts to get the “State” of the service, and alerts when the State is not “Running”.&amp;#160; So, what other states are there?&amp;#160; Here is a list of possible service states, copied from &lt;a title="http://msdn.microsoft.com/en-us/library/ms685996(VS.85).aspx" href="http://msdn.microsoft.com/en-us/library/ms685996(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms685996(VS.85).aspx&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ServiceMonitorsWhatdoestheStatevaluemean_FCB5/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ServiceMonitorsWhatdoestheStatevaluemean_FCB5/image_thumb_1.png" width="1288" height="396" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;However, I recently ran into an issue where we got an alert from a Service Monitor and Health Explorer showed that State=9:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ServiceMonitorsWhatdoestheStatevaluemean_FCB5/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ServiceMonitorsWhatdoestheStatevaluemean_FCB5/image_thumb_2.png" width="546" height="302" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After checking with the OpsMgr product group, I found that State=9 means “Server not found”, and we get this when we fail to open SCManaged with “RPC_S_SERVER_UNAVAILABLE”.&amp;#160; In this particular case, the problem was on a clustered server which had failed over to the second node, which did not have the OpsMgr Agent installed.&lt;/p&gt;  &lt;p&gt;We also have two other states that are not listed in the above table.&amp;#160; State=8 means “Service not found” (we’re trying to monitor a service that does not exist on the agent), and State=0 means “Unknown state”….not sure exactly when we would see this.&lt;/p&gt;  &lt;p&gt;So, here’s the final list of State values that you may see on a service monitor:&lt;/p&gt;  &lt;p&gt;0 = MOM_SERVICE_UNKNOWN_STATE   &lt;br /&gt;1 = MOM_SERVICE_STOPPED    &lt;br /&gt;2 = MOM_SERVICE_START_PENDING    &lt;br /&gt;3 = MOM_SERVICE_STOP_PENDING    &lt;br /&gt;4 = MOM_SERVICE_RUNNING    &lt;br /&gt;5 = MOM_SERVICE_CONTINUE_PENDING    &lt;br /&gt;6 = MOM_SERVICE_PAUSE_PENDING    &lt;br /&gt;7 = MOM_SERVICE_PAUSED    &lt;br /&gt;8 = MOM_SERVICE_NOT_FOUND    &lt;br /&gt;9 = MOM_SERVER_NOT_FOUND&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3272546" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Monitor/default.aspx">Monitor</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Service/default.aspx">Service</category></item><item><title>SQL Server Full Text Search Service Monitor</title><link>http://blogs.technet.com/jimmyharper/archive/2009/07/02/sql-server-full-text-search-service-monitor.aspx</link><pubDate>Thu, 02 Jul 2009 10:41:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3260651</guid><dc:creator>jimmyharper</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3260651.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3260651</wfw:commentRss><description>&lt;P&gt;This issue is described in the SQL Server Management Pack Guide, but I wanted to blog it since I’ve seen a couple customers hit it.&lt;/P&gt;
&lt;P&gt;In the current version of the SQL Server Management Pack (version 6.0.6559.0), we have a monitor for the SQL Server Full Text Search Service which is targeted at the SQL 2005/2008 DB Engine classes.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb.png" width=833 height=496 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is, this is an optional component in SQL Server and is not always installed.&amp;nbsp; So, for servers where this service is not installed, we will see a lot of the following alerts:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Alert Name:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Service Check Probe Module Failed Execution&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Service Check Data Source Module Failed Execution&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Alert Description:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Error getting state of service Error: 0x8007007b Details: The filename, directory name, or volume label syntax is incorrect. One or more workflows were affected by this. Workflow name: Microsoft.SQLServer.2005.DBEngine.FullTextSearchServiceMonitor Instance name: MSSQLSERVER Instance ID: {625091EA-A1D9-1857-802C-0D908C93A5BB} Management group: jimmyh_mg1 &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_10.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_10.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_4.png" width=836 height=348 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix this, all we need to do is disable this monitor on any SQL Server that does not have the Full Text Search Service installed.&amp;nbsp; The easiest way to do this is to create a group for all of the SQL Instances that do not have the service installed.&amp;nbsp; The Full Text Search Service name is one of the discovered properties for the DB Engine class and will be blank if the service is not installed:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_4.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_1.png" width=708 height=321 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a group of SQL instances that do not have it installed, we can just use the criteria “Does not match regular expression . (dot)”, like this:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_6.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_2.png" width=588 height=701 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, just set an “Enabled=False” override on the monitor, targeted at this group:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_8.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_3.png" width=702 height=500 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Repeat the same steps to create the group and override for SQL 2008 DB Engines.&lt;/P&gt;
&lt;P&gt;One more thing that you’ll want to do with this monitor is set the “Alert only if startup type is automatic” override to False for clustered SQL Instances…..since the service will always be in a Manual startup mode.&lt;/P&gt;
&lt;P&gt;To do this, I create a group of Cluster SQL Instances where Full Text Search Service IS Installed:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_12.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_12.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_5.png" width=580 height=699 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And target the override at this group:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_14.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_14.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_6.png" width=699 height=503 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/f32844acbbb8_1F9C/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, repeat for SQL 2008 DB Engines.&lt;/P&gt;
&lt;P&gt;Attached is a sample MP that contains the above groups and overrides for SQL 2005 DB Engines.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UPDATED:&lt;/P&gt;
&lt;P&gt;I've removed the original attachment and attached a .zip file that contains these MPs for both SQL 2005 and SQL 2008.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3260651" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/jimmyharper/attachment/3260651.ashx" length="3857" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Monitor/default.aspx">Monitor</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Service/default.aspx">Service</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Service+Monitor+SQL+Cluster/default.aspx">Service Monitor SQL Cluster</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Management+Pack/default.aspx">Management Pack</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Full+Text+Search/default.aspx">Full Text Search</category></item><item><title>SQL Database Properties Not Discovered</title><link>http://blogs.technet.com/jimmyharper/archive/2009/06/11/sql-database-properties-not-discovered.aspx</link><pubDate>Thu, 11 Jun 2009 20:26:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3253623</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3253623.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3253623</wfw:commentRss><description>&lt;P&gt;I ran into an issue recently where some SQL Databases were not showing any properties in OpsMgr, other than the database name:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb.png" width=470 height=340 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get these properties, the database discovery script runs the “sp_helpdb” stored procedure against the database.&amp;nbsp; To test this, open SQL Server Managment Studio, connect to the SQL Instance in question, open a new query window and run “sp_helpdb &amp;lt;database name&amp;gt;”":&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_4.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb_1.png" width=1115 height=335 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;NOTE: You should run this under the same account that is used for the “SQL Server Discovery Account” RunAs Profile….if you haven’t defined an account for this profile, then use the Action Account.&lt;/P&gt;
&lt;P&gt;If this doesn’t return any results (as shown below), then the problem is likely due to permissions.&amp;nbsp; From the SQL MP guide, the requirements for DB discovery are:&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=295&gt;
&lt;P&gt;· EXEC permissions for (sp_helpdb)&lt;/P&gt;
&lt;P&gt;· Select from sys.databases table in the master database&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_8.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb_3.png" width=824 height=306 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLDatabasePropertiesNotDiscovered_ABB3/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Also, before running sp_helpdb, the discovery script will query to get a list of databases.&amp;nbsp; In SQL 2005/2008, the query is:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000&gt;SELECT name, state_desc FROM sys.databases WHERE source_database_id IS NULL&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;In SQL 2000, the query is:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000&gt;SELECT name FROM sysdatabases&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The difference is that in SQL 2005/2008, we have the “WHERE source_database_id IS NULL“ clause, which will eliminate snapshot databases…..so if the SQL instance has any snapshot databases, they will not be discovered.&amp;nbsp; We also select the “state” column from sys.databases in SQL 2005/2008 DB discovery, and if the state is not “ONLINE”, then the discovery ends there….so this would be another reason why the database properties do not show up in OpsMgr.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Attached to this blog are debug version of the database discovery script:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;DiscoverSQL2005DB_debug.txt – Use this for SQL 2005/2008&lt;/P&gt;
&lt;P&gt;DiscoverSQL2000DB_debug.txt – Use this for SQL 2000&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To run the script:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Rename to .vbs&lt;/LI&gt;
&lt;LI&gt;Run the following command: &lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;cscript DiscoverSQL2005DB_debug.vbs &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;&amp;lt;fqdn&amp;gt;&lt;/STRONG&gt; &lt;STRONG&gt;&amp;lt;Server\instance&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; "exclude:"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Replace the bold items with:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&amp;lt;fqdn&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt; = Full Qualified Domain Name of the SQL Server (server.domain.com)&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;&amp;lt;Server\instance&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; = SQL Server instance that we want to discover DBs on.&amp;nbsp; If it is the default instance, it will just be the server name (SERVER), otherwise it will be SERVER\INSTANCE&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Sample output from my server:&lt;/P&gt;
&lt;P&gt;Server name is jimmyhsql1.jimmyhdom.com&lt;/P&gt;
&lt;P&gt;SQL instance is OpsDB&lt;/P&gt;
&lt;P&gt;Command line is &lt;STRONG&gt;cscript discoversql2005db_debug.vbs jimmyhsql1.jimmyhdom.com jimmyhsql1\opsdb "exclude:"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output (I only copied the output for the first couple DBs):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Entering DoDatabaseDiscovery function... &lt;BR&gt;Connection string is Server=jimmyhsql1\opsdb;Database=master;Trusted_Connection= &lt;BR&gt;yes &lt;BR&gt;Error number is 0 &lt;BR&gt;Querying for list of non-snapshot databases... &lt;BR&gt;Error number is 0 &lt;BR&gt;================================== &lt;BR&gt;DatabaseName: master &lt;BR&gt;DatabaseState ONLINE &lt;/P&gt;
&lt;P&gt;Runing sp_helpdb master &lt;BR&gt;ErrorNumber: 0 &lt;BR&gt;If no results are listed below, then sp_helpdb did not return anything....check &lt;BR&gt;permissions &lt;/P&gt;
&lt;P&gt;DatabaseSize: 4 &lt;BR&gt;DatabaseSizeNumeric: 4 &lt;BR&gt;LogSize: 0.5 &lt;BR&gt;LogSizeNumeric: 0 &lt;BR&gt;RecoveryModel: SIMPLE &lt;BR&gt;Updateability: READ_WRITE &lt;BR&gt;UserAccess: MULTI_USER &lt;BR&gt;Collation: SQL_Latin1_General_CP1_CI_AS &lt;BR&gt;DatabaseAutogrow: True &lt;BR&gt;LogAutogrow: True &lt;BR&gt;Owner: sa &lt;BR&gt;================================== &lt;/P&gt;
&lt;P&gt;================================== &lt;BR&gt;DatabaseName: tempdb &lt;BR&gt;DatabaseState ONLINE &lt;/P&gt;
&lt;P&gt;Runing sp_helpdb tempdb &lt;BR&gt;ErrorNumber: 0 &lt;BR&gt;If no results are listed below, then sp_helpdb did not return anything....check &lt;BR&gt;permissions &lt;/P&gt;
&lt;P&gt;DatabaseSize: 23.0625 &lt;BR&gt;DatabaseSizeNumeric: 23 &lt;BR&gt;LogSize: 1 &lt;BR&gt;LogSizeNumeric: 1 &lt;BR&gt;RecoveryModel: SIMPLE &lt;BR&gt;Updateability: READ_WRITE &lt;BR&gt;UserAccess: MULTI_USER &lt;BR&gt;Collation: SQL_Latin1_General_CP1_CI_AS &lt;BR&gt;DatabaseAutogrow: True &lt;BR&gt;LogAutogrow: True &lt;BR&gt;Owner: sa &lt;BR&gt;==================================&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3253623" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/jimmyharper/attachment/3253623.ashx" length="9129" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Discovery/default.aspx">Discovery</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/database/default.aspx">database</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/script/default.aspx">script</category></item><item><title>SQL Agent Job Discovery not working?</title><link>http://blogs.technet.com/jimmyharper/archive/2009/06/05/sql-agent-job-discovery-not-working.aspx</link><pubDate>Fri, 05 Jun 2009 05:36:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3250573</guid><dc:creator>jimmyharper</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3250573.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3250573</wfw:commentRss><description>&lt;P&gt;The SQL Server Management Pack includes an option to discover and monitor SQL Server Agent Jobs for SQL 2000/2005/2008.&amp;nbsp; The Discovery for this is disabled by default:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb.png" width=697 height=240 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I ran into an issue recently where all Agent Jobs for specific SQL Servers were not being discovered.&amp;nbsp; Examining the event logs on the SQL Server, we see the following in the OpsMgr Event Log:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;Log Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Operations Manager &lt;BR&gt;Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Health Service Modules &lt;BR&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/4/2009 8:36:19 PM &lt;BR&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21406 &lt;BR&gt;Task Category: None &lt;BR&gt;Level:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Warning &lt;BR&gt;Keywords:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Classic &lt;BR&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A &lt;BR&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OMDW.opsmgr.net &lt;BR&gt;Description: &lt;BR&gt;The process started at 8:36:18 PM failed to create System.Discovery.Data. Errors found in output: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\4595\SQLAgentJobDiscovery.vbs(106, 5) Microsoft VBScript runtime error: Type mismatch &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;Command executed:&amp;nbsp;&amp;nbsp;&amp;nbsp; "C:\Windows\system32\cscript.exe" /nologo "SQLAgentJobDiscovery.vbs" {974F57A5-5705-B6B2-B8DC-1CA0B433DCD4} {46913442-CAC1-7E38-89B4-1A6B462ED0D0} OMDW.opsmgr.net OMDW.opsmgr.net&amp;nbsp; OMDW\I01 I01 SQLAgent$I01" &lt;BR&gt;Working Directory:&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\4595\ &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;One or more workflows were affected by this.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;Workflow name: Microsoft.SQLServer.2008.AgentJobDiscoveryRule &lt;BR&gt;Instance name: SQLAgent$I01 &lt;BR&gt;Instance ID: {46913442-CAC1-7E38-89B4-1A6B462ED0D0} &lt;BR&gt;Management group: PROD1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The “Type mismatch” error typically means that some variable in the script is returning with an incorrect data type.&amp;nbsp; After examining the Discovery script and doing to troubleshooting, we determined that the problem was happening because the “Description” field for the Agent Job was NULL.&amp;nbsp; This can be confirmed by running the “sp_help_job” Stored Procedure against the MSDB database on the SQL Instance (which is exactly what the Discovery script does:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_4.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_1.png" width=913 height=307 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will also happen if any of the following properties of the job are NULL:&lt;/P&gt;
&lt;P&gt;job_id &lt;BR&gt;originating_server &lt;BR&gt;name &lt;BR&gt;description &lt;BR&gt;category &lt;BR&gt;owner &lt;/P&gt;
&lt;P&gt;We probably won't ever see this with the job_id, originating_server, category or name properties, but we've seen it with the description and owner properties.&lt;/P&gt;
&lt;P&gt;To correct this, we can simply enter some text in the description field of the Agent Job:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_6.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_2.png" width=945 height=658 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Note that the problem described above (Agent Job discovery failing when properties are NULL) happens on SQL 2005 and 2008 Agent Jobs.&amp;nbsp; SQL 2000 Agent Job Discovery does not use the VBScript, and does seem to work in this scenario, but the NULL values are populated with the values of other Agent Jobs, so it is not accurate.&lt;/P&gt;
&lt;P&gt;So, what if you have a very large number of SQL Servers and Agent Jobs and do not want to worry about making sure that all of them have text in the Description field?&amp;nbsp; To take care of this, I created a “workaround” version of the SQL Agent Job Discoveries that will discover these jobs and enters NULL for the NULL propeerty.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Import the “Microsoft.SQLServer.200x.Discovery.CustomAgentJobDiscovery.xml” management pack &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Disable the original Agent Job Discovery and enable the new one (“SQL Server 200x Custom Agent Job Discovery”):&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_8.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_3.png" width=750 height=184 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Verify that the Agent Jobs are discovered:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_10.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_10.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_4.png" width=663 height=376 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/SQLAgentJobDiscoverynotworking_13BF7/image_thumb_4.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3250573" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/jimmyharper/attachment/3250573.ashx" length="11913" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Discovery/default.aspx">Discovery</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Type+Mismatch/default.aspx">Type Mismatch</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Agent+Job/default.aspx">Agent Job</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Management+Pack/default.aspx">Management Pack</category></item><item><title>AD Trust Monitor doesn’t reset to Healthy State</title><link>http://blogs.technet.com/jimmyharper/archive/2009/05/20/ad-trust-monitor-doesn-t-reset-to-healthy-state.aspx</link><pubDate>Wed, 20 May 2009 09:33:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3243630</guid><dc:creator>jimmyharper</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3243630.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3243630</wfw:commentRss><description>&lt;p&gt;The Active Directory Management Pack (ADMP) – version 6.0.6452.0 – contains a monitor named “AD Trust Monitoring”.&amp;#160; This monitor runs a VBScript which queries WMI to get the status of the Domain Trusts on the Domain Controller.&amp;#160; Is the trust has an error status, the Monitor should change to a critical state, when the error status goes away, it should change back to a Healthy State:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ADTrustMonitordoesntresettoHealthyState_15DB/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ADTrustMonitordoesntresettoHealthyState_15DB/image_thumb.png" width="952" height="650" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The problem is that, with default settings, once the Monitor goes into a Critical state, it will not change back to a Healthy state once the Trust problem is resolved.&amp;#160; This is due to a bug in the script, where the value that is used to set the “Good” state is dependent on an override being set.&amp;#160; Without getting into the details, just know that the only way to get the Monitor to work properly (so that state is changed from Critical to Healthy when a Trust problem is resolved), is to set the “LogSuccessEvent” override to “True”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ADTrustMonitordoesntresettoHealthyState_15DB/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ADTrustMonitordoesntresettoHealthyState_15DB/image_thumb_1.png" width="716" height="736" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Setting this Override will also cause the script to log an event to the OpsMgr Event Log every time it completes successfully.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3243630" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Monitor/default.aspx">Monitor</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/ADMP/default.aspx">ADMP</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Trust/default.aspx">Trust</category></item><item><title>Configuring or Disabling Replication Monitoring in the Active directory Management pack</title><link>http://blogs.technet.com/jimmyharper/archive/2009/05/20/configuring-or-disabling-replication-monitoring-in-the-active-directory-management-pack.aspx</link><pubDate>Wed, 20 May 2009 08:30:10 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3243598</guid><dc:creator>jimmyharper</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3243598.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3243598</wfw:commentRss><description>&lt;p&gt;The latest version of the Active Directory Management Pack (ADMP) – version 6.0.6452.0 – contains some significant changes to Replication Monitoring.&amp;#160; The basic premise is the same, but the Rules and Monitors used have changed a bit.&lt;/p&gt;  &lt;p&gt;Here’s a quick overview of how Replication Monitoring works:&lt;/p&gt;  &lt;p&gt;Each Domain Controller runs the AD Replication Monitoring VBScript.&amp;#160; The first time the script runs, it creates an object for the DC in the OpsMgrLatencyMonitors container in each Active Directory Naming Context that is monitored (the options are Domain, Configuration, and Application; these can be configured via overrides).&amp;#160; By default, every 6th time the script runs (determined by the “Change Injection Frequency” override), the script will update the AdminDescription attribute on the DC’s objects in Active Directory with the current time (these objects can be seen in ADSIEdit.msc).&amp;#160; The script will also look at the objects for all other DCs in its local copy of the Directory.&amp;#160; To determine how long replication from each DCs is taking, the script will look at the whenCreated attribute (this tells the DC when that copy of the object arrived at this DC) and the AdminDescription attribute (this tells the DC when the object was updated).&amp;#160; The time difference between when the object was updated and when it arrived at this DC tells us how long it takes to replicate an object from the given DC.&lt;/p&gt;  &lt;p&gt;The script does a number of other things as well….more details on how all of the scripts in the ADMP work can be found in the old ADMP Technical Reference, found &lt;a href="http://www.microsoft.com/DownLoads/details.aspx?FamilyID=39055bed-9585-4c1c-bf51-58bb3da779e0&amp;amp;displaylang=en"&gt;here&lt;/a&gt;.&amp;#160; This technical reference was written for the original ADMP for MOM 2005, but &lt;em&gt;much&lt;/em&gt; of the information about how the ADMP scripts work still applies today.&lt;/p&gt;  &lt;p&gt;Back to the subject of this blog.&amp;#160; The previous version of the ADMP used a Monitor named “AD Replication Monitoring” to run the Replication Monitoring script.&amp;#160; It also had 4 rules that ran the script as well.&amp;#160; In the new version of the ADMP, the monitor has been “deprecated” and is disabled by default.&amp;#160; Several Rules have been created to run the script and alert on various issues.&amp;#160; The purpose of this change was to avoid alert storms when one Domain Controller stops replicating (previously, we would get an alert from each DC, now we get just one).&amp;#160; The downside of this change is that we now have fourteen (14) Rules that run the Replication Monitoring script.&amp;#160; That’s 14 rules for each OS version….so, 14 for Windows 2000 DCs, 14 for Server 2003 DCs, and 14 for Server 2008 DCs.&amp;#160; To confuse things a little more, some of the rules have the EXACT same display names.&lt;/p&gt;  &lt;p&gt;So, if you need to set overrides to configure or disable Replication Monitoring, they must be set on all of the following Rules:&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;AD Replication is occurring slowly&lt;/font&gt; (there are three rules with this name)     &lt;br /&gt;&lt;font color="#ff0000"&gt;One or more domain controllers may not be replicating&lt;/font&gt; (there are three rules with this name)     &lt;br /&gt;&lt;font color="#ff0000"&gt;DC has failed to synchronize naming context with its replication partner&lt;/font&gt; (there are three rules with this name)     &lt;br /&gt;&lt;font color="#ff0000"&gt;All of the replication partners failed to replicate.      &lt;br /&gt;AD Replication Performance Collection - Metric Replication Latency      &lt;br /&gt;AD Replication Performance Collection - Metric Replication Latency:Minimum      &lt;br /&gt;AD Replication Performance Collection - Metric Replication Latency:Maximum      &lt;br /&gt;AD Replication Performance Collection - Metric Replication Latency:Average&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Why are some of these rules triplicated?&amp;#160; Behind the scenes, these are written to distinguish between replication problems from different versions of Windows Domain Controllers.&amp;#160; For example, if you look in the XML for the ADMP, you can see that the three “AD Replication is occurring slowly” rules have the following IDs:&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Active_Directory_Latency_Alert_Rule_For_Windows2000 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Active_Directory_Latency_Alert_Rule_For_Windows2003 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Active_Directory_Latency_Alert_Rule_For_Windows2008&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So, for example, each of these rules applies to a Windows Server 2003 Domain Controller, and watches for replication problems from the specified Domain Controller version.&lt;/p&gt;  &lt;p&gt;Again, all of the above rules run the same Replication Monitoring script, so if you need to configure overrides for the script, you must set them on all of these rules.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3243598" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Monitor/default.aspx">Monitor</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/ADMP+Active+Directory+Replication+Monitoring/default.aspx">ADMP Active Directory Replication Monitoring</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Replication+Monitoring/default.aspx">Replication Monitoring</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/ADMP/default.aspx">ADMP</category><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Management+Pack/default.aspx">Management Pack</category></item><item><title>AEM Views and tables</title><link>http://blogs.technet.com/jimmyharper/archive/2009/02/21/aem-views-and-tables.aspx</link><pubDate>Sat, 21 Feb 2009 04:29:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3205143</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3205143.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3205143</wfw:commentRss><description>&lt;p&gt;I'll soon be putting together some AEM (Agentless Exception Monitoring) reports, so I figured I'd familiarize myself with the how AEM data is stored in the Date Warehouse.&amp;nbsp; Surprisingly, not all of the useful data is stored in Views....you have to go to the tables for the good stuff.&lt;/p&gt; &lt;p&gt;If I've missed anything, please let me know.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;&lt;font size="5"&gt;AEM DW Views:&lt;/font&gt;&lt;/h3&gt; &lt;h4&gt;CM.vCMAemRaw&lt;/h4&gt; &lt;p&gt;· Contains raw data for application errors &lt;p&gt;· ErrorGroupRowID can be joined with AEMErrorGroup table to get Application Error details &lt;p&gt;· AEMUserRowID can be joined with AEMUser table to get the user name &lt;p&gt;· AEMComputerRowId can be joined with AEMComputer table to get computername &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image002_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="107" alt="clip_image002" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image002_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h4&gt;CM.vCMAemErrorGroupDaily&lt;/h4&gt; &lt;p&gt;· Daily aggregation of application errors (by error) &lt;p&gt;· Shows daily numbers for specific application errors &lt;p&gt;· Shows how many times each application error was seen per day, and a count of users/computers &lt;p&gt;· ApplicationRowID can be joined with AEMApplication table to get application details &lt;p&gt;· ErrorGroupRowID can be joined with AEMErrorGroup table to get Application Error details &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image004_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="58" alt="clip_image004" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image004_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h4&gt;CM.vCMAemApplicationDaily&lt;/h4&gt; &lt;p&gt;· Daily aggregation of application errors (by application) &lt;p&gt;· Shows daily numbers for specific applications &lt;p&gt;· Shows how many times each application had an error, how many different errors it had, how many user/computers had errors &lt;p&gt;· ApplicationRowID can be joined with AEMApplication table to get application details &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image006_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="55" alt="clip_image006" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image006_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h4&gt;CM.vCMAemDaily&lt;/h4&gt; &lt;p&gt;· Shows the date/time that daily aggregations happened &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image008_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="264" alt="clip_image008" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image008_thumb.jpg" width="167" border="0"&gt;&lt;/a&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;&amp;nbsp; &lt;h3&gt;&lt;font size="5"&gt;AEM DW Tables:&lt;/font&gt;&lt;/h3&gt; &lt;h4&gt;AemApplication&lt;/h4&gt; &lt;p&gt;Contains name/version for applications that we have errors from &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image010_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="74" alt="clip_image010" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image010_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h4&gt;AemComputer&lt;/h4&gt; &lt;p&gt;Contains computer names that we have received errors from…also shows date/time that last error was received. &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image012_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="103" alt="clip_image012" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image012_thumb.jpg" width="451" border="0"&gt;&lt;/a&gt; &lt;h4&gt;AemErrorGroup&lt;/h4&gt; &lt;p&gt;Contains details of specific application errors that we have received &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image014_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="74" alt="clip_image014" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image014_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h3&gt;AemSystemErrorGroup&lt;/h3&gt; &lt;p&gt;· Contains basic info about system errors (BucketType, User, Computer, time) &lt;p&gt;· Details of the system error are not included &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image016_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="27" alt="clip_image016" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image016_thumb.jpg" width="628" border="0"&gt;&lt;/a&gt; &lt;h3&gt;AemUser&lt;/h3&gt; &lt;p&gt;Contains user names that we have received errors from…also shows date/time that last error was received. &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image018_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="48" alt="clip_image018" src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/AEMViewsandtables_110CB/clip_image018_thumb.jpg" width="339" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3205143" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/AEM+database+table+view+report/default.aspx">AEM database table view report</category></item><item><title>No Alert from SQL MP when clustered services go down</title><link>http://blogs.technet.com/jimmyharper/archive/2009/02/21/no-alert-from-sql-mp-when-clustered-services-go-down.aspx</link><pubDate>Sat, 21 Feb 2009 04:16:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3205139</guid><dc:creator>jimmyharper</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3205139.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3205139</wfw:commentRss><description>&lt;P&gt;I recently ran into the following issue:&lt;/P&gt;
&lt;P&gt;The SQL Server Management Pack has several monitors to monitor various SQL Services:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_6.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=238 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_2.png" width=957 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_2.png"&gt;&lt;/A&gt; 
&lt;P&gt;However, on a SQL Cluster, if one of these services is taken offline:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=132 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb.png" width=847 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;We don't get an alert from SQL (we do get a cluster alert saying that a cluster is offline), and the monitor stays healthy:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_4.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=98 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_1.png" width=503 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This happens because:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;By default, a Basic Service Monitor will only monitor services whose startup type is Automatic&lt;/LI&gt;
&lt;LI&gt;On a Clustered SQL instance, the service startup type will be set to Manual&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;To fix this, you simply need to set the "Alert only if startup type is automatic" override to "False" for the Clustered SQL Instances&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_10.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=350 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_4.png" width=1035 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_12.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_12.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=277 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_5.png" width=244 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_14.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_14.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=715 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_6.png" width=706 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_6.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, the health state is changed when the service is down and we are properly alerted:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_16.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_16.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=182 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_7.png" width=554 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/NoAlertfromSQLMPwhenclusteredservicesgod_10118/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTES:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The SQL&amp;nbsp;Monitors affected by this are:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.DBEngine.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.ReportingServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.AnalysisServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.IntegrationServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.DBEngine.FullTextSearchServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2008.Agent.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.DBEngine.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.ReportingServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.AnalysisServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.IntegrationServices.ServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.DBEngine.FullTextSearchServiceMonitor&lt;/LI&gt;
&lt;LI&gt;Microsoft.SQLServer.2005.Agent.ServiceMonitor&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You must have at least version 6.0.6441.0 of the SQL Server Management Pack for this to work.&amp;nbsp; The latest version is 6.0.6460.0 and can be downloaded &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8C0F970E-C653-4C15-9E51-6A6CADFCA363&amp;amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8C0F970E-C653-4C15-9E51-6A6CADFCA363&amp;amp;amp;displaylang=en"&gt;here&lt;/A&gt;.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;If you manually create a Basic Service Monitor in the OpsMgr console, the "Alert only if startup type is automatic" override will not work.&amp;nbsp; You'll need to export the MP and edit the XML to add &amp;lt;CheckStartupType&amp;gt;true&amp;lt;/CheckStartupType&amp;gt; to the monitor configuration (this is already done in the latest SQL MP):&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Before change (not working):&lt;/P&gt;
&lt;P&gt;&amp;lt;ComputerName&amp;gt;$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkNam&lt;BR&gt;e$&amp;lt;/ComputerName&amp;gt;&lt;BR&gt;&amp;lt;ServiceName&amp;gt;Messenger&amp;lt;/ServiceName&amp;gt;&lt;BR&gt;&amp;lt;/Configuration&amp;gt;&lt;BR&gt;&amp;lt;/UnitMonitor&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;After change (working):&lt;/P&gt;
&lt;P&gt;&amp;lt;ComputerName&amp;gt;$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkNam&lt;BR&gt;e$&amp;lt;/ComputerName&amp;gt;&lt;BR&gt;&amp;lt;ServiceName&amp;gt;Messenger&amp;lt;/ServiceName&amp;gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;&amp;lt;CheckStartupType&amp;gt;true&amp;lt;/CheckStartupType&amp;gt;&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;/Configuration&amp;gt;&lt;BR&gt;&amp;lt;/UnitMonitor&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3205139" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Service+Monitor+SQL+Cluster/default.aspx">Service Monitor SQL Cluster</category></item><item><title>ACS report:  All events for specified user (even more than the built-in version)</title><link>http://blogs.technet.com/jimmyharper/archive/2009/02/16/acs-report-all-events-for-specified-user-even-more-than-the-built-in-version.aspx</link><pubDate>Mon, 16 Feb 2009 06:18:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3202786</guid><dc:creator>jimmyharper</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3202786.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3202786</wfw:commentRss><description>&lt;P&gt;A customer recently showed me that the built-in ACS report&amp;nbsp; "Forensic_-_All_Events_For_Specified_User" seemed to be missing some events.&amp;nbsp; This report queries the Adtserver.dvall5 view in the OperationsManageAC database and looks for values in the PrimaryDomain\PrimaryUser fields that match the user name that is entered for the report.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The problem that my customer was seeing was that "Group Change" events (event id 632,633,636,637,650,651,655,656,660,661,665,666) were stored a little differently.&amp;nbsp; The Primary Domain/User fields contain the name of the user that was added to or removed from the group, and the Client Domain/User fields contain the name of the user that made the change.&amp;nbsp; So, when you enter the domain\username and run the report, any group change event returned is for events where that user was added to (or removed from) a group and not events where that user added other users to a group.&amp;nbsp; So which one do you want??&amp;nbsp; Maybe you want both, since they are both technically related to that user.&amp;nbsp; Every event is defined in the EventSchema.xml file, so are there any others that put the username in something other than the Primary User field (the other fields for usernames are ClientUser, Targetuser, and HeaderUser)?&lt;/P&gt;
&lt;P&gt;It would make sense to use the Header Domain/User fields, since that is where we usually store the name of the user that 'caused' the event, but another issue that I've seen is (for reasons I do not know), sometimes security events are logged without the domain name, sometimes they have the NetBIOS domain name, and sometimes the fully-qualified domain name.&amp;nbsp; In these cases, some events would not be shown since you have to enter "Domain\Username" as a parameter.&lt;/P&gt;
&lt;P&gt;So, I put together a custom ACS report that does the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Separates the Domain and Username fields in the report parameters, so they can be entered separately&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Queries the HeaderDomain, PrimaryDomain, ClientDomain, and TargetDomain fields to get a list of domain names&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Includes a &amp;lt;ALL&amp;gt; option in the Domain parameter, which will allow you to include events where the domain name is empty&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Queries the Primary User/Domain, Client User/Domain, Target User/Domain and Header User/Domain fields for the Domain/Username&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ACSreportAlleventsforspecifieduserevenmo_11D7A/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ACSreportAlleventsforspecifieduserevenmo_11D7A/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=174 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ACSreportAlleventsforspecifieduserevenmo_11D7A/image_thumb.png" width=1028 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/ACSreportAlleventsforspecifieduserevenmo_11D7A/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So, the end result is a report that will show ALL ACS events that include the specified user name.&amp;nbsp; This will include events where that user "did something" and events where "something was done" to that user account.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;BR&gt;&lt;/STRONG&gt;The queried domain list may take some time to populate, which makes the report take a while to open.&amp;nbsp; The code can easily be changed to include a static domain list, or to only contain "&amp;lt;ALL&amp;gt;".&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3202786" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/jimmyharper/attachment/3202786.ashx" length="29878" type="text/xml" /><category domain="http://blogs.technet.com/jimmyharper/archive/tags/ACS+Report/default.aspx">ACS Report</category></item><item><title>Custom performance report with threshold line</title><link>http://blogs.technet.com/jimmyharper/archive/2009/02/16/custom-performance-report-with-threshold-line.aspx</link><pubDate>Mon, 16 Feb 2009 04:39:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3202774</guid><dc:creator>jimmyharper</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jimmyharper/comments/3202774.aspx</comments><wfw:commentRss>http://blogs.technet.com/jimmyharper/commentrss.aspx?PostID=3202774</wfw:commentRss><description>&lt;P&gt;I recently had a need to create an OpsMgr report to show performance data with a "threshold" line, so that it would be easy to see data points that went over a defined threshold.&amp;nbsp; We can't do this with the built-in generic performance report, so I put together this one:&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=235 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_thumb_1.png" width=1028 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_thumb_1.png"&gt;&lt;A href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_2.png" mce_href="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=782 alt=image src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_thumb.png" width=954 border=0 mce_src="http://blogs.technet.com/blogfiles/jimmyharper/WindowsLiveWriter/Customperformancereportwiththresholdline_102FF/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The following parameters are available in the report:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Start Date / End Date&lt;BR&gt;&lt;/STRONG&gt;Time range that we are interested in.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Object Name&lt;BR&gt;&lt;/STRONG&gt;Select the performance object that you are interested in.&amp;nbsp; This is populated by the objects in the vPerformnaceRule view in the Data Warehouse database.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Counter Name&lt;/STRONG&gt;&lt;BR&gt;Select the counter that you are interested in.&amp;nbsp; This is populated by the counters in the vPerformanceRule view, based on the Object that was selected.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Computer&lt;/STRONG&gt;&lt;BR&gt;Select the computers that you are interested in.&amp;nbsp; This is populated with a list of computers that have data in the Data Warehouse for the performance object that was selected.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Threshold Line&lt;/STRONG&gt;&lt;BR&gt;Optional.&amp;nbsp; Enter a value for the threshold.&amp;nbsp; A red line will be drawn at this value on the chart, and any data point above this value will be labeled with the computer name and the value for the data point.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Min / Max Sale Value&lt;/STRONG&gt;&lt;BR&gt;Optional.&amp;nbsp; This is the minimum and maximum values to for the "Value" axis on the chart.&amp;nbsp; If not defined, these will be calculated based on the values of the data returned.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data Type&lt;/STRONG&gt;&lt;BR&gt;Select the data set to use from the Data Warehouse....options are "Hourly" (hourly average of the data points), "Daily" (daily average of the data points), and "Raw" (all data points).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GMTOffset&lt;/STRONG&gt;&lt;BR&gt;I don't have the cool time zone selector in this report, so you'll need to enter the GMT offset for the time zone that the data should be converted to (data in the Data Warehouse is stored in GMT time).&amp;nbsp; For example, if the computers you are interested in are in New York (Eastern Time), you would enter "-5" (without the quotes).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Report Title&lt;/STRONG&gt;&lt;BR&gt;Enter a title for the report&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTES:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;This re.port will not work correctly if run directly in SQL Reporting Services, it must be run from the OpsMgr Console.&lt;/LI&gt;
&lt;LI&gt;I haven't tested this with all perf counters, so some may not look too pretty in this chart&lt;/LI&gt;
&lt;LI&gt;After importing the report into SRS, you'll need to fix the data source to point to your "Date Warehouse Main" data source......I'll soon post a blog on how to add reports to a management pack so this can be avoided.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3202774" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/jimmyharper/attachment/3202774.ashx" length="43353" type="text/xml" /><category domain="http://blogs.technet.com/jimmyharper/archive/tags/Report/default.aspx">Report</category></item></channel></rss>