views:

46

answers:

2

Is it possible to execute a SSIS package in C# Code ? We can process cube using the namespace "Microsoft.AnalysisServices.AdomdClient". What will be namespace/method to be used for executing a package/task, if possible? This considers Script Task too, in SSIS.

+2  A: 

see Running a Package Programmatically on the Local Computer from msdn

moi_meme
Thanks. It worked for me.
Sreejesh Kumar
How do we perform the execution of a particular control flow task in C# ? Is it possible to change the SSIS variable in C# code just like we perform in Script Task, using the instance of Application class ?
Sreejesh Kumar
A: 

The way we do this is we call a stored procedure from code and this stored procedure runs the SSIS package.

DECLARE @Command varchar(500);

SET @Command = 'dtexec /FILE "<SSIS File Name Goes Here>" /Decrypt "<Password Here>"';

EXEC msdb..xp_cmdshell @Command
joshlrogers