-1

I have a package which is deployed using SQL server agent. I am executing the SQL server agent by calling a stored procedure. i have declared some variables inside the ssis package ,i want to use these variables as parameter in stored procedure. any body Please help me. Thanks in advance.

junaib
  • 21
  • 2
  • 10

1 Answers1

0

If you are allowed to use xp_cmdshell you could use dtexec to execute the package from a stored procedure . Passing a parameter can be done like this:

exec xp_cmdshell 'dtexec /f "c:demo\demo.dtsx" set \package.configurations[Configuration1].properties[Variable].value;int-002'

This is not a best practice. I would prefer to use my stored procedure to write my variables to a table first and then read from that table in SSIS with an Execute SQL statement as you can read here Populate an SSIS variable using a SQL statement

analyzethat
  • 191
  • 1
  • 16