Hi All ,
In my project , I have around 10 package which simply loading data from txt file and generating new csv files
I have all the package name in one object table and I am looping it and executing, but here package are getting executing one at a time in sequentially.
I am executing package using below query by passing package name as parameter from table
Declare @intExecutionID bigint
, @status BIGINT = 1
,@Job_ID int =100
,@Env_ID int = 12
,
@PackageName nvarchar(1000) = ?
EXEC catalog.Create_execution
@folder_name = 'DataPlatform',
@project_name = 'DataPlatform',
@package_name =
@PackageName, -- parameterized
@reference_id = @Env_ID, /*** Environment reference id , double click on the environment and in general tab see the value for identifier*****/
@use32bitruntime = 0,
@execution_id = @intExecutionID out
--setting parameters
EXEC Catalog.set_execution_parameter_value
@execution_id = @intExecutionID,
@object_type = 30, /*Use the value 20 to indicate a project parameter or the value 30 to indicate a package parameter*/
@parameter_name = 'parJobID',
@parameter_value = @Job_ID /*if int the direct value ex: 1, if string them in quotes ex:"Sam"*/
EXEC [SSISDB].[Catalog].[start_execution]
@execution_id = @intExecutionID
--check if the child package is still running
WHILE(@status = 1 OR @status = 2 OR @status = 5 OR @status= 8)
BEGIN
PRINT @status
PRINT 'waiting 1 min for Package to finish'
WAITFOR DELAY '00:00:05'; /*set the amount of time it needs to wait before rechecking status*/
SET @status = (SELECT [Status] FROM SSISDB.[catalog].[executions]
WHERE execution_id = @intExecutionID);
if (@status=4)
begin
raiserror('please see All Executions Report on the Server for more details',16,1)
end
END
My requirement is is to call all the 10 package at the same time so it can reduce the ETL load time.
Thankx & regards, Vipin jha MCP