Skip to content

Instantly share code, notes, and snippets.

@billinkc
Created June 2, 2014 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billinkc/e511ef08fff844f078ce to your computer and use it in GitHub Desktop.
Save billinkc/e511ef08fff844f078ce to your computer and use it in GitHub Desktop.
SSIS failed execution query
-- Find all messages associated to the last failing run
SELECT
OM.operation_message_id
, OM.operation_id
, OM.message_time
, OM.message_type
, OM.message_source_type
, OM.message
FROM
SSISDB.catalog.operation_messages AS OM
WHERE
OM.operation_id =
(
-- Find the last failing operation
-- lazy assumption that biggest operation
-- id is last. Could be incorrect if a long
-- running process fails after a quick process
-- has also failed
SELECT
MAX(OM.operation_id)
FROM
SSISDB.catalog.operation_messages AS OM
WHERE
OM.message_type = 120
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment