overriding variable value with DTEXCECUI /SET option not working

hi I am trying to change variable value at run time in ssis 2012 package using DTEXECUI utility but can not see any changes happening in config file variable value and also data is not getting populated in my table as per new variable value.

Can anyone show me the right syntax or method of dynamically changing variable value either through DTEXECUI or DTEXEC
command propmt command.

Thanks in advance

August 21st, 2015 10:21am

Here's an excerpt from helpful article

Let's examine this concept in the context of packages stored in the .dtsx
format in the file system, which implies that they are part of the legacy
Package Deployment Model (we will deal with the implications of Project
Deployment Model on dtexec.exe operations in an upcoming article), starting with
the property paths of the variables (refer to one of our earlier
articles
for more information on the subject of SSIS
variables
). In order to reference a variable via the property path notation,
you need to provide its scope, namespace, and name. As a general rule (in the
case of the Package Deployment Model), the notation always starts with the
\Package prefix. The backslash character ('\') is a container separator, period
('.') designates collections (such as Properties and Variables), while members
of these collections are identified by their index, enclosed in square brackets
([]). The index is formed by specifying a unique characteristic of a collection
member, which can be either its name (in the case of Properties) or (when
dealing with Variables, where duplicates are allowed) also their namespace, with
the double colon (::) as the separator.

In order to become more accustomed to this syntax, let's consider a sample
package that contains a single Data Flow Task with its default name and two user
variables. Var1 has the package-wide scope while the visibility of Var2 is
limited to the Data Flow Task only. With these settings in place, you can
reference our variables in the following manner:

\Package.Variables[User::Var1].Properties[Value] \Package\Data Flow Task.Variables[User::Var2].Properties[Value]

http://www.databasejournal.com/features/mssql/SSIS-2012-using-dtexec.exe-to-run-file-system-based-packages.html

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 2:38pm

Hi srm_2010,

The dtexec command prompt utility is used to configure and execute SQL Server Integration Services packages. The /Set option overrides the configuration of a parameter, variable, property, container, log provider, Foreach enumerator, or connection within a package.

The following is an example of executing a package that is saved in the file system and providing a new value for a variable:
dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue

The following example of running a package from the .ispac project file and setting package and project parameters.
/Project c:\project.ispac /Package Package1.dtsx /SET \Package.Variables[$Package::Parameter];1 /SET \Package.Variables[$Project::Parameter];1

For more details about dtexec command prompt utility, please refer to the following document:
https://msdn.microsoft.com/en-us/library/hh231187(v=sql.110).aspx

Thanks,
Katherine Xiong

August 26th, 2015 11:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics