sysdtssteplog stepexecresult stepexecstatus values to monitor a DTS package

Posted on 2006-04-19
Last Modified: 2013-11-30
I have written a DTS package and will be monitoring it via this table but would like to know the different values for stepexecresult and stepexecstatus in the msdb..sysdtssteplog table.  Can anyone advise.

Question by:Netstore
    1 Comment
    LVL 42

    Accepted Solution

     CASE dsl.stepexecstatus
             WHEN 1 THEN 'DTSStepExecStat_Waiting'
             WHEN 2 THEN 'DTSStepExecStat_InProgress'
             WHEN 3 THEN 'DTSStepExecStat_Inactive'
             WHEN 4 THEN 'DTSStepExecStat_Completed'
         END AS [Step Execute Status]
       , CASE dsl.stepexecresult
             WHEN 0 THEN 'DTSStepExecResult_Success' --EZ completed
             WHEN 1 THEN 'DTSStepExecResult_Failure'


    open up dts in designer and right click in white space and choose package properties from the resulting menu. Then click on the logging tab and check the log package to sql server option and close dialogue and save package.


    When the package runs again (and fails) run this script (got from this site) and change the package name to your package name.

    USE msdb

    DECLARE @package_name sysname

    SET @package_name = 'YourPackageName'

       dsl.stepname AS [Step Name]
       , CASE dsl.stepexecstatus
             WHEN 1 THEN 'DTSStepExecStat_Waiting'
             WHEN 2 THEN 'DTSStepExecStat_InProgress'
             WHEN 3 THEN 'DTSStepExecStat_Inactive'
             WHEN 4 THEN 'DTSStepExecStat_Completed'
         END AS [Step Execute Status]
       , CASE dsl.stepexecresult
             WHEN 0 THEN 'DTSStepExecResult_Success'
             WHEN 1 THEN 'DTSStepExecResult_Failure'
         END AS [Step Execute Result]
       , dsl.starttime AS [Start Time]
       , dsl.endtime AS [End Time]
       , dsl.elapsedtime AS [Elapsed Time]
       , dsl.progresscount AS [Row Count]
       , dsl.errorcode AS [Error Code]
       , dsl.errordescription AS [Error Description]
       dbo.sysdtspackagelog dpl
       INNER JOIN dbo.sysdtssteplog dsl
          ON dpl.lineagefull = dsl.lineagefull
       dpl.logdate = (SELECT
                         dbo.sysdtspackagelog dpl1
       AND = @package_name


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
    Introduced in Microsoft SQL Server 2005, the Copy Database Wizard ( is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now