Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Sharing SSIS Expression Amongst Packages

$
0
0

Hello:

We have a common Expression with System Variables that we want to be able to use across various packages.  How can we do this?

For example, when OnError event occurs, we want to send an email notification with the Error Code, Error Description, Package Name & ID, Task Name & ID, various Time Stamps, etc.  Currently, we can do this by using an Expression and copying the Task in the OnError Event Handler to other packages and even projects.  However if we need to change the template of the email message to include other System Variables in the future, we want to be able to update the Expression for all Packages at once (instead of going to each Package and updating each Expression in the OnError Event Handler).

I've tried inserting the Expression as a Project Parameter, but then the email message is only able to return the string containing the Expression in the Project Parameter -- it will not execute the Expression.  In other words, there is no function we can use such as EvaluateAsExpression(@[$Project::DynamicErrorMsgProjectParam]).

I've tried using Package Variable (at least there will be less navigation necessary to get to the Expression this way), but this doesn't work either since some of the System Variables only pertain to Tasks / Event Handlers and the scope of the Variable can't seem to be dynamic.

Nonetheless, ideally, I rather use Project Parameter so that we only have to change the Expression once per project as oppose to having to do it for each package.  I wish there is an EvaluateAsExpression flag or function we can use for Project Parameters. 

Anyone have any suggestions on how to go about this?  Thanks in advance!


Viewing all articles
Browse latest Browse all 24688

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>