Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Accumulating SQL Server Errors into a Single Variable

$
0
0

Hi all!

On certain SQL Server errors there are multiple messages generated, but a simple assignment like @[User::ErrorMessage] = @[System::ErrorDescription] only retrieves the latest message.  Not all messages behave like this and many return the important message that can be acted upon. 

How do I retrieve all of them, especially the first one, which most often is the actual problem.   I am NOT interested in SSISDB, or DTS logging "workarounds", just how to assign to a variable.

Would an expression in OnError, like "@[User::ErrorMessage] = @[User::ErrorMessage] + ".  " + @[System::ErrorDescription]" work?  I cannot test this at the moment.

Thank you!




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>