locked
Need to call DTSX or dtexec from ASP.MVC application RRS feed

  • Question

  • User-1440129275 posted

    Hi I need to select date from UI page( from MVC c# app) and execute ssis package from MVC with the date parameter.

    lots of source available for Microsoft.SQlServer.Dts.Runtime but unfortunately I have a VS 2017 and SSDT 15.1 so I do not have this dll in my program files. So I have this dll using Microsoft.SqlServer.Management.IntegrationServices. I need to execute this either directly loading package (from remote machine) or executing dtexe or poweshell to trigger the cmd file or call cmd.exe from . net code. But not sure how to pass parameter to the package if we call using powershell or cmd.exe which is running in remote machine.

    Please help with this query. The package is deployed in other windows server not in database/SQL agent as we had permission issue. Please please help  

    Friday, July 24, 2020 6:16 AM

All replies

  • User1535942433 posted

    Hi loksat.0218@gmail.com,

    As far as I think,you could use dtexec Utility.

    The utility has four phases that it proceeds through as it executes. The phases are as follows:

    1.Command sourcing phase: The command prompt reads the list of options and arguments that have been specified. All subsequent phases are skipped if a /? or /HELP option is encountered.

    2.Package load phase: The package specified by the /SQL, /FILE, or /DTS option is loaded.

    3.Configuration phase: Options are processed in this order:

     >>Options that set package flags, variables, and properties.
     >>Options that verify the package version and build.
     >>Options that configure the run-time behavior of the utility, such as reporting.

    4.Validation and execution phase: The package is run, or validated without running if the /VALIDATE option was specified.

    More details,you could refer to below article:

    https://docs.microsoft.com/en-us/sql/integration-services/packages/dtexec-utility?view=sql-server-ver15

    Best regards,

    Yijing Sun

    Monday, July 27, 2020 7:32 AM