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

Is it possible to "override" a Package level UserVariable that is used in an expression at run time via the DTEXEC /Set option

$
0
0

All...

I have inherited this process and I am looking for some guidance and assistance. 

I have a Project that uses an SMTP email notification process for communicating the START / STOP and any ERROR conditions that may arise during execution.  The project runs against multiple environments DEV, QA and PROD instances and the email communication is supposed to indicate the environment in the email Subject line.  The way that the developer created this process was to embed an expression in the Subject line of the SMTP configuration see the below expression string
("Start " + @[System::MachineName] +  " " + @[$Project::p_SYSYTEM_NAME]+ " "+ @[User::v_ENVIROMENT])

The difficulty here is that the [User::v_ENVIROMENT] is hardcoded with a string indicating the environment at deploy time; so when they deployed to DEV the developer would change the variable value to DEV, to QA the developer would change the variable value to QA, and finally to PROD the developer would change the variable value to PROD.

Certainly not the way to manage the settings and the deploy process; and I recognize in advance that the SMTP email process is also not ideal (however client environments dictate the necessity and the continued use of this process...)

I have tried  multiple options to use the /set command to override the values, however upon execution the SSIS project fails with the following message:

Command that generates the error - (with client specifics changed)

DTExec/Server"SERVERNAME\DEV" /ISServer"\SSISDB\FolderName\ProjectName\pkg_load_PACKAGE.dtsx" /SET"\Package.Variables[User::v_ENVIRONMENT];DEV_TEST_OVERIDE"

Error message -

"Failed to configure an overridden property that has the following path: \Package.Variables[User::v_ENVIRONMENT]. The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created."


joemac


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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