Just a quick blog post today.

I wanted to see how long all my packages were taking to run in SSIS on SQL Server 2012, due to there being some storage issues, which related to the jobs taking longer to run.

So below is the query that I used to pass my parent package, so that I could then get back all the child packages.

Select

        Distinct (EX.executable_id)

       ,executable_name

       ,(EXS.execution_duration/1000)asDurationInSeconds

       ,CONVERT(TIME,dateadd(ms,EXS.execution_duration,’01-01-1900′))asDurationInTime

       ,convert(Date,EXS.start_time)asExecutionDate

       ,SUBSTRING(convert(varchar(23),EXS.start_time),12,2)asStartHour

       ,Ex.package_name

 

  FROM[internal].[executables]asEXwith (nolock)

       Innerjoininternal.executable_statisticsasEXSwith (nolock)

              onEX.executable_id=EXS.executable_id

  whereEx.package_name=‘SCOM Parent Package.dtsx’

 

NOTE: Just change the Ex.Package_Name to your package you want to view the SSIS history for.

In my next blog Post I will show you how to use Power Query and by passing a parameter to then view the output of your query.