Hi,
We have an SSIS pacakge where there is an Execute SQL task which has code like :
EXEC samplesp 'tbl1';
EXEC samplesp 'tbl2';
EXEC samplesp 'tbl3';
'
'
'
EXEC samplesp 'tbl15';
The stored procedure "samplesp " has dynamic SQL statement. The stored proc performs a delete operation on table which is passed as a parameter. Depending on the size of the table, the sp execution time varies. The maximum time for its one time execution is around 2 min. For smaller tables it takes around 30 to 50 sec.
Since the same sp is called for different tables in SSIS, the execute SQL task takes around 10-15 minutes. I tried to divide them into 3 execute SQL task so that they run in parallel. But could not find much difference.
When I try to divide all these 15 execute statements into 5 each and execute them in 3 separate connections in SSMS, the execution time is same.
Can you please let me know how this execution of proc with various parameters can be optimized in SSIS?
Also, please let me know if my question is not clear.
Thanks in advance,
Raksha