set @params = '/conn \"a\";"\"' + @a+ '\"" /set \package.variables[b].Value;"\"' + @b+ '\""' set @cmd = 'C:\dtexec.exe /f ' + @PackagePath + ' ' + @params EXEC xp_cmdshell @cmd
Dont forget to enable 'xp_cmdshell' option first!
I had to used 32 bit version of dtexec.exe as my package need OLEDB provider Jet 4.0. The provider is not available under 32 bit environment. As a result, I use the x86 version to handle this issue.
Errors when executing SQL Server SSIS Package From Stored Procedure
How to Call SSIS Package from the Stored Procedure