Catching the Package Configuration Warning

  • I'm using the indirect method of package configuration described here.

    http://www.mssqltips.com/tip.asp?tip=1405

    My question is how do I detect that my package failed to load a configuration such as the environment variable? Right now, if it fails to load a package configuration it throws a warning and runs with the design time settings. That could be very bad since the package is used in multiple environments. I tried configuring the OnError, OnWarning events at the package level, but they are not fired. Any suggestions as to how to stop the package from executing when a package configuration entry fails to load?

    Warnings at design time.

    Warning loading MyPackage.dtsx: The configuration environment variable was not found. The environment variable was: "SSIS_CONFIG_DB". This occurs when a package specifies an environment variable for a configuration setting but it cannot be found. Check the configurations collection in the package and verify that the specified environment variable is available and valid.

    Warning loading MyPackage.dtsx: Failed to load at least one of the configuration entries for the package. Check configurations entries and previous warnings to see descriptions of which configuration failed.

    Warnings at run time.

    Warning: 0x80019003 at MyPackage: The configuration environment variable was not found. The environment variable was: "SSIS_CONFIG_DB". This occurs when a package specifies an environment variable for a configuration setting but it cannot be found. Check the configurations collection in the package and verify that the specified environment variable is available and valid.

    Warning: 0x80012059 at MyPackage: Failed to load at least one of the configuration entries for the package. Check configurations entries and previous warnings to see descriptions of which configuration failed.

  • I just found this on Connect. Please vote for it if you are affected by this issue.

    https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=127206

    Also, I'm still looking for a viable work around. So far, I thinking of validating the Environment variable exists and hoping for the best on the rest.

  • After some thought I came up with the following solutions.

    1. Turn a blind eye and hope for the best

    2. Develop our own package configuration mechanism

    3. Treat all warnings as errors

    4. Manually modify before deployment

    5. Create tool to run packages that can stop running if there is a config problem. (If you run a package through .NET you can discoverning package warnings and stop execution.) See http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/4be093e0-dfdf-490c-a718-25e0bc8074d6 for details.

    For now I'm doing option 3 when possible and 1 if I cannot eliminate all the warnings from a package.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply