Hi, I am trying to execute a SSIS Package from a stored procedure within a transaction. I also want the execution to be in Synchronized mode. This is an example of my stored procedure code:
begin try begin transaction /* inserts, updates */ declare @execution_id bigint EXEC [SSISDB].[catalog].[create_execution] @package_name=N'My Package.dtsx', @execution_id=@execution_id OUTPUT, @folder_name=N'MyFolder', @project_name=N'MyProject', @use32bitruntime=False, @reference_id=Null EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'LOGGING_LEVEL', @parameter_value= 1 EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'SYNCHRONIZED', @parameter_value= 1 EXEC [SSISDB].[catalog].[start_execution] @execution_id; /* throw error if execution status is not = 7 ("Success") */ commit transaction end try begin catch if @@Trancount > 0 rollback transaction; end catch
The problem is that the package reaches a timeout and gets a status = 5 ("Pending").
If I remove the Synchronized setting, it works. If I remove the transaction, it works. But a combination of both will not work. Can anyone think of a simple workaround for this?
Thank you,
Filip