Orchestrator Quick Tip: What’s the Maximum Size of Parameters?

Published Feb 15 2019 12:09 PM 495 Views
First published on TECHNET on May 08, 2012
I see this question on internal discussions list every now and then, so I thought I'd answer it here to be helpful.

The question was:

Is there a maximum length for string parameters in the Initialize Data activity?
And if the answer is “yes” – what would the maximum length for string parameters be?

Let me answer the question by showing you the various points where data transfer occurs and the limitations applied at each point.

The maximum size for any data being passed along the databus is 2GB. This is because the OBJECTINSTANCEDATA table stores the value in a field sized to nvarchar(max). Of course, I would never recommend that you try to use 2GB strings as parameters to anything since the performance is likely to suffer quite a bit.

That said, the individual activities may impose smaller field sizes than this maximum. For instance,  when you use an “Initialize Data” activity to start a runbook, and the runbook is started either via the Orchestration console or the web service, Initialize Data doesn’t impose any size limits, so you could allow up to 2GB per property value. However, if you use the “Invoke Runbook” activity to start the same runbook, the “Invoke Runbook” activity imposes a limit of 2000 characters on any parameter value. Likewise, the “Write to Web Page” activity imposes a 2000 character limit on most properties, except the “Text” property allows the maximum amount, while the “Write to Database” activity limits most properties to 500 characters, while allowing 4000 characters for the database query data.

One special note about activities created using the Integration Toolkit. All of these activities are generic and are stored in the QIKOBJECT table. For these activities, all of the properties are stored in XML format in a single field named ExecutionData, which is an ntext field. According to MSDN, an ntext field can store 2^30 - 1 ( 1,073,741,823 ) characters, or 1GB. So keep that in mind when creating or using Toolkit-based activities… don’t go creating activities that have multiple properties that will store huge amounts of data because the combined set of properties (plus the XML surrounding them) can’t be over 1GB.

These size limits are not meant to be restrictive, but to help ensure reasonable size growth in the database. Most of the time, the data you use is Published Data which is essentially an internal hyperlink to the data from a previous activity. It doesn’t copy the data over and over, replicating a bunch of wasted space along the way. In this case, the text length is actually short, even though the data behind it could be huge because each activity (Initialize Data included) could have that 2GB value availability. Then again, this is really only what is stored in the database. If you choose not to save any activity-specific published data (set via the runbook properties page), then this info is saved only during runbook execution and then discarded, so it doesn’t end up bloating your database.

So the answer for the general question of “how big can parameters be?” is … “it dedends”. It depends on the individual settings (field sizes in the DB) for each activity, but generally it can be as high as 2GB.

Version history
Last update:
‎Mar 11 2019 09:15 AM
Updated by: