Run remote ssis package using dtexec

Is there a way to prevent the dtexec tool from exiting until the package exits if it points to a remote SSIS package?

My package is successful, but dtexec reports a much shorter execution time than the actual duration reported in the "All Executions" report on SQL Server. He prints a message:

To view the details for the execution, right-click on the Integration Services Catalog, and open the [All Executions] report 

My goal is to run dtexec on the command line, and then run another code, which depends on the completion of the package. Ideally, I would like dtexec not to exit until the package has completed.

Is it possible?

+4
source share
1 answer

You are looking for the SYNCHRONIZED parameter

For my link to respond only to the link and code, please answer, here is the Phil code for this with TSQL

 DECLARE @execution_id BIGINT = 0; -- Create a package execution EXEC [SSISDB].[catalog].[create_execution] @package_name=N'Package.dtsx', @ execution_id=@execution _id OUTPUT, @folder_name=N'PhilsTest', @project_name=N'Demo', @use32bitruntime=False; EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'SYNCHRONIZED', @parameter_value=1; -- true -- Start the package EXEC [SSISDB].[catalog].[start_execution] @execution_id; 

To get the same behavior from dtexec , you must specify a parameter, for example

 DTExec /ISSERVER "\SSISDB\folderB\Integration Services Project17\Package.dtsx" /SERVER "." /Envreference 2 /Par "$Project::ProjectParameter(Int32)";1 /Par "Parameter(Int32)";21 /Par "CM.sqlcldb2.SSIS_repro.InitialCatalog";ssisdb /Par "$ServerOption::SYNCHRONIZED(Boolean)";True 
+4
source

Source: https://habr.com/ru/post/1492176/


All Articles