Reputation: 11816
I created an SSIS package with an OnError event handler that inserts some log record on a database.
When I run the package via a batch file, I see in my batch file log that the package failed to execute because the connection to a database (different from the DB where I insert the error logs) fails. However, there is no inserted log record (meaning the OnError event handler did not fire?)
Are OnError event handlers not firing when connection to a DB fails?
Upvotes: 0
Views: 4569
Reputation: 11816
Found it. The DelayValidation property of the whole package must be set to True in order for the validation of connection managers (and other things i think) to be not executed until run time
OnError event handler is not fired because it only works on run time. However, a pre-validation happens before runtime and the package fails when the pre-validation sees that one of the connection to DB is not working
Upvotes: 5
Reputation: 2638
FailPackageOnFailure
set to TrueAlthough you may not want to leave steps 2 and 3 in place for ever, they will allow you to get to the bottom of your current issue.
Upvotes: 0