Another question with A/ switch in dtsrun utilities

  • Hello everyone,

    I know that we can use the command, dtsrun /Sserver_name /Uuser_nName /Ppassword /Npackage_name, to execute a package and it has been working fine for me.  Today I'm trying to use switch A/ to reset the globle variable for me each time I call the package, but it does not work for me.

    Here is the command I use to run in T-SQL

    set @cmd_string = 'dtsrun /ST2 /U'+ltrim(@uname)+' /P'+ltrim(@passwrd)+' /N'+ltrim(@package_name)+' /A'+ltrim(@split)+' :typeid= 8'

    @split is the variable that I want to feed to the package's globle variable each time I run the package.  It is varchar so I assume it is string with typeid of 8.

    Would anyone please help me on this problem on how I can feed this dynamic variable value( @split) into a package's globle variable each time I run the package.

    Thank you very much for your help!

     

     

     

  • Try this:

    ... '/A variable_name:8='+ltrim(@split)

    With variable_name equaling the global variable's name within the DTS package.

     

  • Thanks!  It works great...

     

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply