SSIS Error Messages

SQL Server

You can use this simple query to get the last error message generated in SQL Server Integration Services (SSIS). You might also want to use this base query to configure email alerts, etc.

SELECT TOP 1
    [message_time]
   ,[extended_info_id]
   ,[package_name]
   ,[message_source_name]
   ,[subcomponent_name]
   ,[package_path]
   ,[execution_path]
   ,left([message],400)
FROM ssisdb.[catalog].[event_messages]
WHERE event_name = 'OnError' AND 
      operation_id IN (SELECT MAX(operation_id)
                       FROM ssisdb.[catalog].[event_messages]
                       WHERE event_name = 'OnError')
ORDER BY message_time ASC;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s