Reputation: 1
I do have a quite big project in SSIS, with multiple packages, and some MASTER packages using them.
I want to find the best method to log errors, and send an email on failure.
For that here are some of my constraints :
To do that, I thought about creating a package part, with a C# script where I send the email.
My biggest problem is to retrieve the ErrorDescription.
I tried the followings :
string ErrorDesc = Dts.Variables["$User::ErrorDescription"].Value.ToString()
)dbo.sysssislog
with a SQL task before my C# script, registering the result in a variable. But since I use a Project Connection Manager I need to encrypt the package part like the rest of the project (EncryptSensitiveWithPassword), and then I can't access to the variable of my project Dts.Variables["$Project::SMTP_Credential_Users"].Value.ToString()
(which I could access with an email package part not encrypted.What recommendation do you have in order to log errors and send emails with error content in a serializable way ?
Upvotes: 0
Views: 18