I have created a sql task in control flow. Also, I have created one more sql task in event handler as specified in below url...I'm looking for help. Please let me know how to handle...
http://www.techbrothersit.com/2014/08/ssis-how-to-email-error-messages-from.html
Issue - I have two cases
case1 - When I give "select 1/0" in sql task in control flow - In this case am getting right.
case2 - When I give wrong SP name in sql task in control flow, am getting below error
"[Execute SQL Task] Error: Executing the query "EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Test-..." failed with the following error: "Incorrect syntax near 'dbo'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection
not established correctly." Here is script that is added in sql task
"EXEC msdb.dbo.sp_send_dbmail
@profile_name = '"+ @[User::MailProfile] +"',
@recipients = '"+ @[User::Recipients] +"',"
+"
@body = "+"'Hi All,"+"
Error Information is below
Error Code:" + (DT_STR,50,1252)@[System::ErrorCode] +"
Task Name:"+ @[System::SourceName] +"
Error Description:" + @[System::ErrorDescription] +
"Thank you
IT Team"
+"',
@subject = '"+ @[System::PackageName] + " failed in "+ @[User::EnvironemntName]+"'"