sysdtssteplog stepexecresult stepexecstatus values to monitor a DTS package

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.

LVL 5
NetstoreAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EugeneZ ZhitomirskySQL SERVER EXPERTCommented:
from
http://www.sqlservercentral.com/forums/printtopic.aspx?forumid=23&messageid=166060
 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'

SELECT
   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]
FROM
   dbo.sysdtspackagelog dpl
   INNER JOIN dbo.sysdtssteplog dsl
      ON dpl.lineagefull = dsl.lineagefull
WHERE
   dpl.logdate = (SELECT
                     MAX(dpl1.logdate)
                  FROM
                     dbo.sysdtspackagelog dpl1
                  WHERE
                     dpl1.name = dpl.name)
   AND dpl.name = @package_name
ORDER BY
   dpl.starttime

 

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.