SSIS – Package duration time

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.

Advertisements

12 thoughts on “SSIS – Package duration time

  1. 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) as ExecutionDate,
    SUBSTRING(convert(varchar(23),EXS.start_time),12,2)asStartHour,
    Ex.package_name
    FROM internal.executables as EX with (nolock) Inner join internal.executable_statistics as EXS with (nolock)
    on EX.executable_id = EXS.executable_id
    where Ex.package_name = ‘SCOM Parent Package.dtsx’

    Msg 208, Level 16, State 1, Line 1
    Invalid object name ‘internal.executables’.

  2. Please check the version: Microsoft SQL Server 2012 (SP3) (KB3072779) – 11.0.6020.0 (X64)
    Oct 20 2015 15:36:27
    Copyright (c) Microsoft Corporation
    Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

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