The Output Content Match condition assigns an action based on a match of the output text of an event object. Use this feature to watch for specialized conditions that may be undetected otherwise. This may prove useful when handling Exit Codes from Windows Tasks.
Output Content MatchActions, like all other General Actions, are set up from the global level to the individual event object level. Set up Actions for the Output Content Match Condition by completing the following:
- Select the appropriate node on the Navigator pane (View > Navigator), and then select Add in the Conditions pane (View > Conditions) to open the Actions Selector dialog.
- Expand the desired Object and Output Content Match Condition.
- Select the desired Action to be completed when the Condition is met, and select OK on the Actions Selector to save your settings.
To edit Actions for the Output Content Match condition, complete the following:
- Select the Edit button in the Condition Settings tab to open the Output Content Match form.
- Specify all conditions that the output text from the object meets before responding with the desired action. Select OK to enable and save the Action.Note: The matched text can either be in the form of a string literal, or you can enter a regular expression. To use regular expressions, prefix the match string with regex:, i.e. regex:[a-z]* to match any character a-z.Note: The Step Name listbox is only available when settings match the criteria for an individual SQL Agent Job.
All Output Content Match criteria can be set at the global level and inherited like any other setting.Important: Any match criteria defined at a lower level effectively overrides the inherited criteria. Even if there isn't a match at that level, SQL Sentry won't look farther up the inheritance chain to see if there's any other match criteria set at a higher level. Inherited actions, remain enabled.
For example, a Send Email action is configured at the global level for the SQL Agent Job:Output Content Match condition when the text string overflow appears in any job's output text. You then select on your Data Import job on Server A and enable a Log to Database action for the SQL Agent Job:Output Content Match condition and change the match criteria for this job to insufficient. From now on, the only text string that is checked when the Data Import job runs is insufficient. Even if that string isn't found, it won't look for the overflow string set at the global level. If the insufficient string is matched for that job's output, both the Send Email and Log to Database actions are taken.
When you override the Output Content Match settings at a lower level, you're asked if you'd want to use the higher level Output Content Match criteria as the baseline for this setting.Note: This feature saves you from doing extra work when many content match strings are involved because overriding the Output Content Match criteria generally only requires minor changes.