SSIS Package Level deployment - ssis

In SSIS Package Level deployment child package parallel execution is happening. In one execution point there is three execution record that also needs to execute parallel. If I put debug point on 2nd then it's working as expected otherwise it's always executing first. According to the picture of my child package if put debug point in B then only B is executing which is expected behaviour. But if I didn't put debug point then its always executing A.I am new in SSIS don't know much about terminology, please help.

Related

Parallel ssis execution

I have about 112 packages. Actually these packages are executing sequentially using package master.
I need to execute these packages parallel. I create package master and add all these packages manually but it's not easy for support and maintenance. Is there a way or an idea how to extract all packages names from table parameter for example, then execute them in parallel automatically and not add packages manually?
You can run an execute SQL in a foreach loop (in SSIS) or you can run in a CURSOR in SSMS.
This is a assuming you deploy to SSISDB.
BEGIN
DECLARE #execution_id BIGINT
EXEC [SSISDB].[catalog].[create_execution]
#package_name=N'[Package Name].dtsx'
, #project_name=N'[ProjectName]'
, #folder_name=N'[FolderName]'
, #use32bitruntime=False
, #reference_id=NULL
, #execution_id=#execution_id OUTPUT
-- Execute the package
EXEC [SSISDB].[catalog].[start_execution] #execution_id
END
You can also add parameters if needed.
This is a good article about different applications: https://www.timmitchell.net/post/2016/11/28/a-better-way-to-execute-ssis-packages-with-t-sql/
Note: The default is run async
SSIS does not have support for such scenario out of the box. There are some approaches to do this, but with some limitations.
Async Out of main process Execution
The approach described in #KeithL's answer is pretty straightforward, but has certain drawbacks:
Each child package started in its own execution. You can end up having started all 112 packages experiencing resource shortage. SSIS Engine does not orchestrate overall resources in this case.
Package started in its own execution. It does not inherit parent package params or connection managers. You have to set it anew from calling SQL code or environment variable mappings.
From support point of view - you get 113 independent executions in the SSIS log. Not easy to link it especially on high-load system.
In-process execution
Alternative - handle this parallel invocation scenario with SSIS Task Package Run. From SSIS design approach, you have to describe all packages being run in the master package. Constructing the master package by hand is not practical, so you can use BIML. BIML can build your master package based on some metadata; it is really powerful but requires learning and practice.
Limited parallel execution
Create a For Loop block in SSIS with control variable i and loop exist condition i==0. In the block - set i = select count(*) from <package_queue> with (updlock, readpast) with SQL Task and process to dummy Expression Task if i==0; this is a loop break path. Otherwise, with path condition i>0 read one line from the package queue removing if from the queue, and start selected package execution with Package Run task.
Quite complex, but this is not the end of the story. Make several copies of the Copy Loop block in the SSIS Master package. Thus you will get a framework for concurrent execution with limited concurrency.

SSIS - Package execution stop

I have an issue that is bothering me, and I was thinking maybe someone might be able to help.
The thing is, I have a project made up by multiple packages that are executed within a master package.
When i run the master package, the execution begins, but when it hits the first package that it needs to execute, it just stops.
The output shows me the following things:
SSIS package "Master_Package.dtsx" starting.
SSIS package "Master_Package.dtsx" finished: Canceled.
If i enter that package and run the data flow in it, it works perfectly, but if i run the entire master package, or i just execute that package alone within the master package page, it just stops.
Any help would be gladly appreciated.
Thank you for your time!
Calin
Silly and obvious question: Are you using the execute package task on your master package? If so, are you referencing the right child package at the correct location?
It is a straight forward call from Master to Child even if you are passing parameters within the packages and should be no reason for child package to abend unless you are not calling it correctly.

SSIS Always run a specific step last without connecting to every parent

I have an SSIS package with about 50 different steps. Many of the steps will run in parallel.
I would like to put a ScriptTask at the end of the package such that, regardless of success or failure, I send out an email which reports on the status of the package run (the package logs things to a database as it runs, so the ScriptTask involves querying the status tables and formatting them into HTML).
Is there a way to have a task that executes when all other tasks have either completed running, or been skipped due to dependencies?
I have tried to add my task to the OnError event handler, but this has it raise up to n times when tasks fail in parallel. I don't want to have every single step flow to the ScriptTask with the OnFailure condition, because it will make the package functionally impossible to use due to the volume of connections. I also believe that connecting it as such would not ensure it ran, as some steps would be skipped and thus not have a success or failure status.
I can do this in two different ways
Add a Sequence Container to your Control Flow.
Move all existing Tasks inside of the the Sequence Container
Add your Script Task outside the Sequence Container. Change the Precedence constraint from Success to Completion by double clicking on the line
Option b
Create an package that has your script task in it.
Create a master package that runs the original package and then calls the package with the script task, passing any variables as needed for it to generate the email.

Task Execution Working Correctly. Package Execution Not Working Correctly

I have created an SSIS solution (using SQL SERVER 2012) to extract data from ServiceNow. All the tasks are wrapped in a Sequence Container. When I right click on the Sequence Container and click Execute Task the package behaves as expected. It extracts the data from ServiceNow and performs the rest of the etl. However when I click Execute Package from the Solution Explorer the package successfully completes but it does not extract any data from Service Now.
I have played around with settings and different package designs but with no change in behavior. I can execute with true success at the task level but not the package level. This behavior is even apparent after deployment. I can execute with success from the SSISDB but with no data extraction. When I hook the deployed package to a job I still get no data extraction.
My thinking it has to be some kind of bug or hidden proxy setting because I only get true success (with data extraction) when I manually execute at the task level - i.e. the Sequence Container.
I have been using SSIS for a couple years now and have not come across this issue. Hopefully someone can help or have some ideas.
Got it. I needed a break and to think about this clearly. I needed to update the Package Property Delay Validation from False to True. That solved the issue. I guess the SSIS engine needed the extra time to validate the variable and expressions set up within the package.

Check Points in SSIS

I got question from interview!!!
How to achieve Check point functionality in SSIS with out using check point.
If package fails it has to be re-run from the point that it failed instead of rerunning the entire package.without using check point.
one way is create a task dispatcher as entry point in the control flow. This will only keep track of the last task successfully executed and call the next task depending on that persisted variable. The first time it runs the variable would be 0 and therefore it will start in the first task, if the first task completes successfully the variable will be set to 1. If the task 2 fails, then the next time the control flows run it will restart on task1 and so on... the control flow will look like this: