Dependencies between runbooks in Orchestrator

Posted: 21st August 2012 by Anders Bengtsson in Orchestrator

Today I received a question if it is possible to see the relationship between runbooks in Orchestrator. Relationships in this scenario is runbooks invoking each other. When you build a library of core runbooks, runbooks providing functions multiple runbooks will invoke and use, it is important not to modify these core runbooks without look at all dependencies. We cant see that relationship in a easy way with the runbook designer console. Of course we can open each invoke runbook activity in each runbook and draw the map manually, but that would take a lot of time. Running a SQL query against the Orchestrator database is a faster solution.

The first step in building that SQL query is to list all invoke runbook activities we have in use. The SQL query below will list all activities, or actually all objects, in the Orchestrator environment not marked as deleted. The Objects table includes for example folders too, so not only runbooks.

SELECT Deleted, Name, ParentID, Description, ObjectType
FROM OBJECTS
WHERE (Deleted = 0)

Scroll down in the result list until you find a Invoke Runbook activity, copy the value from the ObjectType field. With the ObjectType value we can now update the query to only include Invoke Runbook activities.

SELECT Deleted, Name, ParentID, Description, ObjectType
FROM OBJECTS
WHERE (Deleted = 0) AND (ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

ParentID is the runbook where the Invoke Runbook activity exists, if we want to show the runbook too, we update the query like

SELECT OBJECTS.Name, OBJECTS.Description, POLICIES.Name AS Expr1
FROM OBJECTS INNER JOIN
POLICIES ON OBJECTS.ParentID = POLICIES.UniqueID
WHERE (OBJECTS.Deleted = 0) AND (OBJECTS.ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

The next step is to look at the configuration of the Invoke Runbook activities

SELECT POLICIES.Name AS [Activity Name], OBJECTS.Name AS [Source Runbook], OBJECTS.Description AS [Activity Description], TRIGGER_POLICY.PolicyPath,
TRIGGER_POLICY.TriggerByPolicyPath, TRIGGER_POLICY.TargetActionServers, TRIGGER_POLICY.WaitToComplete
FROM OBJECTS INNER JOIN
POLICIES ON OBJECTS.ParentID = POLICIES.UniqueID INNER JOIN
TRIGGER_POLICY ON OBJECTS.UniqueID = TRIGGER_POLICY.UniqueID
WHERE (OBJECTS.Deleted = 0) AND (OBJECTS.ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

In the picture below you see a example result from the query. You can now turn this query around to list all runbooks that invokes a specific runbook, or all runbook invoked by a specified runbook.

 

  1. Hi, I am not aware of a limit on number of runbook servers. You can read about services at https://technet.microsoft.com/en-us/library/hh912319(v=sc.12).aspx

  2. rohit says:

    hi, I wanted to know what are the differnt services on which runbook server are dependent and how many Runbook server can be installed ?????