Executing one task

Vaishu 41 Reputation points
2021-03-30T14:10:46.28+00:00

Is there a way to Execute on particular task in SSIS from t sql or c# or any other method, my ssis got about 15 task mostly Execute SQL, On demand, i want to call ssis and execute one task instead of entire ssis

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,450 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 24,936 Reputation points
    2021-03-30T14:26:01.527+00:00

    Hi @Vaishu ,

    A minimal execution unit at run-time is a package.

    You can achieve what you need by redesigning your SSIS package:

    • It is possible to disable any Container/Task at run-time dynamically via project/package boolean parameters set as True or False. You can set the conditions directly/programmatically on the Disable property on any SSIS task in the Control Flow by using Expressions.
    • By using precedence constraints.
    • Rearrange your single monolithic package with mutiple SSIS tasks as one task per package.

    The first bullet is the easiest method.

    1 person found this answer helpful.
    0 comments No comments

  2. Monalv-MSFT 5,891 Reputation points
    2021-03-31T03:41:47.39+00:00

    Hi @Vaishu ,

    We can enable just one task and disable other tasks in ssis packages.
    So, we just execute one task when we are running ssis package with many different methods.

    Please refer to the following links and pictures:
    1.Run an SSIS package with C# code in a .NET app
    2.Run an SSIS package from SSMS with Transact-SQL
    3.SSIS: How to disable task?

    83102-enable.png
    83045-disable.png
    83046-cf.png

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.