Querying the SSIS Catalog? Here’s a handy query!

Posted by jamiet on SQL Blog See other posts from SQL Blog or by jamiet
Published on Wed, 17 Oct 2012 12:05:57 GMT Indexed on 2012/10/17 17:12 UTC
Read the original article Hit count: 671

I’ve been working on a SQL Server Integration Services (SSIS) solution for about 6 months now and I’ve learnt many many things that I intend to share on this blog just as soon as I get the time. Here’s a very short starter-for-ten…

I’ve found the following query to be utterly invaluable when interrogating the SSIS Catalog to discover what is going on in my executions:

SELECT event_message_id,MESSAGE,package_name,event_name,message_source_name,package_path,execution_path,message_type,message_source_type
FROM   (
      
SELECT  em.*
      
FROM    SSISDB.catalog.event_messages em
      
WHERE   em.operation_id = (SELECT MAX(execution_id) FROM SSISDB.catalog.executions)
           AND
event_name NOT LIKE '%Validate%'
      
)q
/* Put in whatever WHERE predicates you might like*/
--WHERE event_name = 'OnError'
--WHERE package_name = 'Package.dtsx'
--WHERE execution_path LIKE '%<some executable>%'
ORDER BY message_time DESC

image

Know it. Learn it. Love it.

@jamiet

© SQL Blog or respective owner

Related posts about SQL Server

Related posts about sql server integration se