Liam Domingo
Liam Domingo

Reputation: 263

Only Get First Part Of Error Description Message in SSIS Package

I have an ssis package that writes information into a table when it fails. Some of the information is the system variable ErrorDescription. My question is how do I only get the first part of the ErrorDescription and not the whole message as it sometimes get too long and doesn't contain useful information and I have to generate report on the errors and the error message is too long for the report.

Thanking you in advance.

Upvotes: 0

Views: 919

Answers (2)

Vikramsinh Shinde
Vikramsinh Shinde

Reputation: 2878

You can use Event Handler on required event by choosing right executable, then by using Script Task/Component you can put your logic to extract the error description.

I am not aware of what exactly your package does, but if it's feasible then something like from below articles can be implemented.

Get error descriptions

How to get error description in ssis

Getting error column name in ssis

Upvotes: 2

Tab Alleman
Tab Alleman

Reputation: 31785

If it were me, I would want to get the entire message into the table every time, and just limit the characters I select for the report if it's too long. But if you don't store the entire error message, you might regret it the one time you chop off some useful information.

However, you can limit the characters you store by using the LEFT() function in the SQL command where you store the error information in the table.

Upvotes: 1

Related Questions