Checking SSIS 2012 Software Packages Using the Managed Object Catalog

I want to verify and then execute the SSIS package stored in the SSIS directory (project deployment model) through objects from the namespace Microsoft.SqlServer.Management.IntegrationServices. When I execute the Validate method from PackageInfo , the class only starts the validation, but does not wait until the end. In one example . I found confirmation to the authors of fires in the "fire and forget" mode - why shoot when we are not worried about the result? In another version, it is carried out without preliminary verification.

  • Do I have to check the package before each execution?
  • If so, how to do it in synchronous mode?
  • I am also interested with the ValidationOperation Property State. It is wrapped catalog.validations statusand may have, inter in addition, meanings succeeded (7)and completed (9)- what is the difference between them?
+5
source share
1 answer

Ad 2: I managed to wait for the result of the check in a loop:

var validationId = package.Validate(false, PackageInfo.ReferenceUsage.UseAllReferences, null);
ValidationOperation validation = package.Parent.Parent.Parent.Validations[validationId];
do
{
    Thread.Sleep(1000);
    validation.Refresh();
}
while (!validation.Completed);
+2
source

All Articles