Event Chains
An event chain is a series of dependencies between events running on the same server or different servers. There is no limit to the length of a chain, or the number of events that can be defined for a chain. To navigate to event chains, select the "Event Chains" node from the Navigator.
Name - Contains the name of the Event Chain. This also is the value displayed in the treeview under the Event Chains node.
Description - Descriptive text for the event chain.
Created by - Displays the chain creator and the date/time of chain creation.
Updated by - If the chain is updated, displays the updater and date/time of update.
Select Chain Instance - Use this drop-down list to select a past runtime for the chain to view its history.
End Time - When viewing an historical chain instance, this will show the time the chain completed.
Status - Displays the status of the chain being viewed as, "Ready", "Running", or "Completed".
Chain Enabled - Option to enable or disable the event chain. If event chain is enabled, it will be represented in the treeview as
, if disabled
.
Edit Button - To add nodes or make changes to a chain, click this button.
Auto refresh - Determines how often the chain workspace will refresh to show updated information when the chain is currently running.
![]() |
NOTE: Only the initial job of the Event Chain needs to be scheduled for the chain to run. |
Event Chain Examples
Example A: When Job1 (SQL Server job) completes, then execute Job2 (SQL Server job). If Job2 succeeds, execute Task A (Windows Task Scheduler Task). If Job2 fails, execute Job3

In order to accommodate a path that encompasses the same event more than once and avoid a circular reference, the concept of nodes are used. A Node is simply a unique representation of an event. Even though Job1 is listed twice, the chain can treat the event as two separate instances and apply varying conditions to each instance which provides a greater degree of flexibility.
Circular References
An event chain is a logical workflow through a series of one or more event objects, with each occurrence of an event object represented by a unique event node. A circular reference would occur if the workflow was built to reference an event node a second time. Such a workflow is not allowed in an event chain.
For example: When Event A completes, then execute Event C. When Event C completes, then execute Event A.

To allow an event to occur a second time in an event chain, add the object Event A a second time to the object list. Change the To Node in the second link to reference the newly created node. This method can be repeated to allow the event to occur a discrete number of times.

Add an Event Chain
- Select the root node for Event Chains in the treeview of the Navigator window.
- Assign the event chain a name and optionally a description.
- Right-click to add objects that will be used in the event chain or drag and drop jobs from the Navigator onto the Event Chain diagram. Node names will be given to each object.
- Add links to the chain by right-clicking the appropriate node, then select Workflow. Next, select the status condition for execution and the target node.
- Nodes can be drag and dropped to reposition for easier viewing of the chain. Auto Layout may also be used once links are established.
- Save the chain.
Edit an Event Chain
- Select Event Chain node from the treeview in the Navigator window.
- Click the Edit button.
- Edit the necessary properties of the Event Chain.
- Save the chain.
NOTE: If nodes or workflow are changed for a chain, history for the chain becomes invalid and will be lost.
Chain History
To view an historical run of a chain, select the runtime from the Select Chain Instance listbox. Runtime and status information will be displayed for each node. If the object completed successfully, it will have a green background. If it failed, it will have a red background. This is also shown for currently executing chains. Currently executing nodes will have an orange background.
Context Menus
Navigator Pane
|
Item |
Description |
|
Open |
Opens the Event Chain. |
|
Edit |
Opens the Event Chain in edit-mode. |
|
Start Chain |
Starts all lead nodes of this Event Chain. |
|
Delete |
Delete the chain. |
|
Disable |
Disable the chain. |
|
Reset |
Reset a currently running chain. |
|
Change Folder |
Allows you to move the specified chain to a different organizational folder. |
View Mode
Workspace
|
Item |
Description |
|
Refresh |
Refresh the current view. Also done by pressing F5. |
|
|
Print the chain diagram. |
|
Print Preview |
Preview the printed chain layout. |
|
Zoom |
Zoom in or out to view entire chain. |
Node - <Current> Chain Instance
|
Item |
Description |
|
Execute Node |
Allows you to manually run a node in a chain. If the node is a lead node for a chain, then any child nodes will be executed upon completion. No child nodes will start if the node being executed is not a lead node. |
|
Jump To ... |
|
|
-- This Instance |
Brings up a calendar displaying the selected node's current instance. |
|
-- Last Failure |
Brings up a calendar displaying the last failure for the selected node. |
|
-- Last Instance |
Brings up a calendar displaying the last instance of the selected node. |
|
-- Next Instance |
Brings up a calendar displaying the next instance of the selected node. |
|
-- Navigator |
Navigates to the selected node in the Navigator. |
|
Show |
|
|
-- History |
|
|
---- 4 Hours |
Displays the last 4 hours of job history for the selected node. |
|
---- 1 Day |
Displays the last 1 day of job history for the selected node. |
|
---- 3 Days |
Displays the last 3 days of job history for the selected node. |
|
---- 7 Days |
Displays the last 7 days of job history for the selected node. |
|
---- 14 Days |
Displays the last 14 days of job history for the selected node. |
|
---- 30 Days |
Displays the last 30 days of job history for the selected node. |
|
-- Runtime Graphs |
Shows the current runtime graphs for the selected node. |
|
Properties |
View the properties of the object. |
Node - Historical Chain Instance
|
Item |
Description |
|
Execute Node |
Allows you to manually run a node in a chain. If the node is a lead node for a chain, then any child nodes will be executed upon completion. No child nodes will start if the node being executed is not a lead node. |
|
Jump To ... |
|
|
-- This Instance |
Brings up a calendar displaying the selected node's current instance. |
|
-- Last Failure |
Brings up a calendar displaying the last failure for the selected node. |
|
-- Last Instance |
Brings up a calendar displaying the last instance of the selected node. |
|
-- Next Instance |
Brings up a calendar displaying the next instance of the selected node. |
|
-- Navigator |
Navigates to the selected node in the Navigator. |
|
Show |
|
|
-- History |
|
|
---- 4 Hours |
Displays the last 4 hours of job history for the selected node. |
|
---- 1 Day |
Displays the last 1 day of job history for the selected node. |
|
---- 3 Days |
Displays the last 3 days of job history for the selected node. |
|
---- 7 Days |
Displays the last 7 days of job history for the selected node. |
|
---- 14 Days |
Displays the last 14 days of job history for the selected node. |
|
---- 30 Days |
Displays the last 30 days of job history for the selected node. |
|
-- Runtime Graphs |
Shows the current runtime graphs for the selected node. |
|
Start Chain Here |
Allows you to execute a chain from a node other than a lead node. When this option is selected, a new chain instance is created that contains a copy of the nodes status for the instance you are viewing. |
|
Properties |
View the properties of the object. |
Edit Mode
Workspace
|
Item |
Description |
|
Add Nodes |
Allows you to add new Jobs or Tasks as nodes in the chain. |
|
Save |
Save any changes to the chain. |
|
|
Print the chain diagram. |
|
Print Preview |
Preview the printed chain layout. |
|
Auto Layout |
Organizes and arranges the chain into a default flowchart pattern. |
|
Zoom |
Zoom in or out to view the entire chain. |
Node
|
Item |
Description |
|
Workflow |
Allows you to specify the condition on which one node will execute another. |
|
Rename Node |
Rename the node. This will not rename the actual job or task. |
|
Delete Node |
Delete the existing node from the chain. |
|
Properties |
View the properties of the job or task. |
Event Chain Notifications
General Actions
|
Condition |
Fired When |
|
Event Chain: Started |
Any lead node for an Event Chain has completed. |
|
Event Chain: Completed |
After last node in an Event Chain has completed. |
|
Event Chain: Success |
Every node in an Event Chain runs. |
|
Event Chain: Failure |
One or more nodes in an Event Chain do not run. |
|
Event Chain: Runtime Threshold Max |
The Event Chain runtime exceeds the Maximum Runtime Threshold settings specified for the Event Chain. |
|
Event Chain: Runtime Threshold Min |
The Event Chain runtime exceeds the Minimum Runtime Threshold settings specified for the Event Chain. |
|
Event Chain Node: Started |
The Event Chain node starts. |
|
Event Chain Node: Completed |
The Event Chain node completes. |
|
Event Chain Node: Success |
The Event Chain node completes, reporting a success. |
|
Event Chain Node: Failure |
The Event Chain node completes, reporting a failure. |
|
Event Chain Node: Runtime Threshold Max |
The Event Chain node exceeds the Maximum Runtime threshold specified for the node. |
|
Event Chain Node: Runtime Threshold Min |
The Event Chain node exceeds the Minimum Runtime threshold specified for the node. |
When more than one workflow path exists in a chain, the Chain Success and Chain Failure conditions become less valuable since they are based exclusively on whether or not all nodes completed. At that point the Node Success and Node Failure conditions should be used for more accurate status information about the respective nodes and/or paths.
Settings
Event Chains and Event Chain Nodes support Runtime Threshold settings. These settings are specified as absolute runtimes for both the minimum and maximum runtime thresholds.
|
Setting |
Description |
|
Inherit From Parent |
Specified whether the runtime threshold settings are inherited from the parent object. |
|
Maximum Runtime Threshold |
The maximum allowed runtime for the chain/node. |
|
Minimum Runtime Threshold |
The minimum allowed runtime for the chain/node. |
Audit Actions
|
Condition |
Fired When |
|
Event Chain Modified |
Modifications are made and saved to an Event Chain. |
EVENT VIEW
All Event Chains contain an Event View sub-node. Double-clicking or selecting Open from the context menu will produce a calendar of all the objects that are apart of the selected chain. As with any Custom Event View, you also have the ability to add Performance Counters to any Event Chain View.
Event Chain Calendar info
All Event Source Objects that appear on a calendar because of an Event Chain will display a small chain glyph in the top left corner.
Additionally, the Event Source Object tool tip will display information about any chain(s) that this object is associated with. An * is placed next to the actual chain that created this instance.
Reporting Services Jobs in Event Chains
It is a known limitation that Reporting Services jobs will not work within chains in versions prior to 2.7. This limitation occurs because Reporting Services jobs are filtered out of SQL Sentry as they have no duration and do not reflect the accurate information about the report.
A workaround is available in version 2.7 and later, as described below:
Normally, SQL Sentry filters out a Reporting Services job. You can force them to stay in the history and thus alert chaining that they have completed by placing an additional space after the AddEvent call.
For example, if you currently have:
AddEvent @EventType='Test', @EventData= '5B0537EA-7A87-4C8B-B002-03A51DD5100C'
You could change it to:
AddEvent @EventType='Test', @EventData= '5B0537EA-7A87-4C8B-B002-03A51DD5100C'
After the change is made, reset the chain.
**IMPORTANT**
If you manually modify the SSRS scheduler job step text as described above, and at a later date make modifications to the report schedule via any SSRS tool, the manual step text changes you made will be overwritten. It is important to remember to make these modifications to the step text again if you have included an SSRS report as node in an Event Chain.
Copy Chain
You may run into a situation where you want to create a second chain that is similar to an existing chain, or want to use an existing chain as a template for new chain. You can effectively copy a chain, using the Save Chain As... option on the File Menu,
You will then be asked to enter a new name and optional description for the chain.
NOTE: To see new Event Chains created by other Client users, right-click on the Event Chains root node and select Refresh.
Organizing Event Chains
Event Chains can be organized using custom folder names. Any Event Chain can be moved into another folder by dragging and dropping into another folder.
See also:
