Validating SSIS package - ssis

If I create an SSIS package in SSDT that has an error of some sort, save the package, then close and reopen it, it will do validation upon opening the project and alert me of any errors. However, this is the only way I have found to find if I have any errors. If I simply click Build, it will do so without any errors, so this is not the same process as the initial validation. Do I really have to close out of the package and reopen in SSDT to get this functionality? The only other way I have seen is actually during runtime after executing the package. I'm looking for a way before execution.

Task Validations occurs when you open the package if you are working online. This is useful because it finds errors in a package, in most cases with its connections.
If a package contains many connections(SQL or file or others), and every time you open the package, one has to wait several minutes for the validation to complete. If one wants to skip this, change the SSIS to work offline(SSIS->Work offline). This has no affect running the SSIS package as SQL Server Job.
Otherwise, this validation is ALWAYS done automatically before the package executes. If the tasks have validation errors, the execution fails.
The only way I know to explicitly validate the SSIS package is from SSMS Integration Services Catalog. Here you can go to a particular SSIS package and right click on the package you need to validate. Of course, the package needs to be deployed for this.

Related

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 package getting executed successfully without implementing the logic

I have a packge that was completing succesfully without throwing errors when executed. But it is not implementing the logic. The data is not flowing. Even the control flow is also not getting implemented. The execution results shows everything got validated.
But it is throwing following warning message.
BIDS Helper had problems highlighting expressions and configurations: Object reference not sent to an instance of object.
Can anyone please suggest me what could be the reason for this.
BIDS Helper is an Add-In - you can disable it temporarily from the Visual Studio menu: Tools / Add-In Manager.
If that avoids your issue, then I would check if you have the latest version of BIDS Helper installed.

Send Failure Email and Fail Package or Job

I have several SSIS packages that I inherited that have been scheduled as Jobs in SSMS that send email notifications inside of the SSIS package. So, if a particular piece of one of the SSIS packages fail, certain users receive an email notification with the failure and the details of the failure. This works fine for individual packages or SSMS jobs that do not depend on the failure or success of a package ahead of it.
My problem and my question centers around how do I allow the failure email notifications to complete in the package but fail the package in such a way that the step in the SSMS job fails so that other steps do not kick off? Is there a way to do this without having to undo all of the failure notifications inside of the SSIS packages and moving those failure notifications out somewhere else?
I'm using SQL Server 2008-R2.
EDIT: If I simply have the task fail the package, the Failure Send Mail task will not kick off.
Instead, I want it to do this,
but capture that the package was actually a failure. Can I do this with the package as it is, or will I have to have the package fail and redo all of the packages so the failure notifications are sent a different way. Again, this is important for SSMS jobs that contain multiple steps, not so much for the individual packages themselves.
Dunno whether SSIS from SQL Server 2008 had this property already or was it released later, but you can do this on the mail task to indicate this it's just for error handling. Also, you can set FailPackageOnFailure afterwards:

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.

Inconsistent "cannot access file" error when processing flat file

We have an SSIS 2008R2 process that includes a step where an external application is launched in a task that executes a remote procedure call. The external application produces output as a flat file, which SSIS is then supposed to pick up and process. When the external process has finished, the task that launched it completes successfully.
The executive summary version of our problem is that we seem to always have to run the package twice before the step succeeds that processes the flat file. Anyone have an idea why, and what we might try to resolve this?
Here are the gory details:
The SSIS package pauses while the external process is running, as it is supposed to do, and waits for the "all clear" from the external application before attempting to read the file that has been produced. (FWIW, the external application creates the file when it starts, then populates it over the course of its run.)
Our problem is that, both during development when the package is being run from BIDS and during testing when the package is run as a scheduled SQL Server job, the package would sometimes (bot not always) fail and report that it was unable to open the text file. BUT, it is not consistent.
The file in question is written to a network share. We have verified that the share is accessible to the network account under which the job runs, as well as to the developers.
We have tried adding a script task that does the following:
Verify that the file exists
If the file exists, try to open it as a stream for read/write access, in exclusive mode.
If the file is not available, wait for a specified time and try again. Keep trying until either it is successfully opened (and then closed again), or until the limit of number of tries is reached.
Once the file has been successfully opened, close the stream and wait for a few more seconds in case there is a latency problem of some sort.
Although the script is designed to report a failure if it is never able to open the file, we have never seen that branch of the code actually execute (i.e. we are ALWAYS successful in an attempt to open the file).
We know that networks are busy places and that, microseconds after we close the file, something else could come along behind our backs and open it again, but there is absolutely no reason to expect this to be the case in our environment.
Finally, when the package is run from the SQL Server job on a schedule it always fails. When we do nothing more than re-execute the job manually, it seems to "always" succeed. (It was not always so; before we upped the wait time after our successful attempt to open the file even this was not enough.)
The code that we use to test for whether the flat file could be opened came from a thread right here on StackOverflow. I'm happy to post it if anyone thinks our test might itself be contributing to the problem, but it's hard to understand how that could be since the package works sometimes.
Lets give a try like following...
Can you create a Proxy under SSIS Package Execution.
Try to execute this step with this proxy(Run As drop down once you edit Step).