This will be a short post, but I often need the SQL Query to get the Runbook ID and the Parameter ID from a specific Runbook in System Center Orchestrator.
So, as I always look on the Internet, I decided to write this post for you and me when I need this.
Select lower(POLICIES.UniqueID) as RunbookID, lower(CUSTOM_START_PARAMETERS.UniqueID) as ParameterID, CUSTOM_START_PARAMETERS.value
From POLICIES
INNER JOIN OBJECTS on POLICIES.UniqueID = OBJECTS.ParentID
LEFT OUTER JOIN CUSTOM_START_PARAMETERS on OBJECTS.UniqueID = CUSTOM_START_PARAMETERS.ParentID
Where POLICIES.Name ='Your Runbook Name' and policies.deleted = 0
Put the Name of the Runbook in the Query.
The result should look like this

Michael Seidl, aka Techguy
au2mate, everything
Pingback: PowerShell Script to trigger Orchestrator Runbook - TechGuy
Thanks dude, your SQL statement saved me a lot of time.
I am happy to help
Running SCORCH 2022 and get this error when trying your query. Suggestions? Msg 208, Level 16, State 1, Line 1
Invalid object name ‘POLICIES’.
Hi, seems more you are at the wrong table, please check that you run the query against the Orchestrator DB.
thanks