DTS PACKAGE STEPS MONITORING

  •       I  have a process that i need to complete, one objective of the process is to monitor a DTS Package for completion or failure.  The package has been scheduled as job, there are seven steps in the dts package each step takes approx 3 minutes to execute.  How can i monitor the status of each step in the DTS Package while the job is in progress, to alert me that the entire dts package completed successfully or at which step did the process fail.\

     

    Thanks Anthony


    Anthony Malone

  • You can run a SQL Trace to track the progress of each step in the DTS package.

    Or you can create a log file when the packge is executed (DTS package properties / Logging tab)

     

  • I prefer (on my important DTS packages) to create a table to log job steps (something like tblDTSLog, etc.). I add steps in the DTS package itself to write to this log table (one On Success and one On Failure). That way you can query the table, and it maintains history for you. Sometimes I had SQL Server Agent jobs go out and check the log table for errors, etc. and email me the results.

  • Or for something completely different, you could turn on the inbuilt SQL Server Package Logging. This logs package/step/task execution to tables in the msdb database. From there it's a simple t-sql query to get the results you need.

    To check for package completion you just need to query the endtime column in sysdtspackagelog. When the package starts this field is null and is populated when the package completes. It's a very similar query for step execution using the sysdtssteplg table. If you want/need to log custom messages you can use the WriteTaskRecord, or WriteStringToLog methods in an ActiveXScript task. These methods log entries into the sysdtstasklog table.

    And guess what, it automatically retains an execution history that is linked to the version of the package that executed.

    Another thought, you could actually use the "On Failure" workflow to notify you, instead of constantly watching ti execute.

    --------------------
    Colt 45 - the original point and click interface

  • We use a combination of methods to track our ETL jobs. We have a custom logging table that logs the start and stop of the package by Lineage Full GUID. This allows us to go into the sysdtsteplog and match up the instance of the package running by the LineageFull column. It's a great time saver for debugging issues with the packages.

  • Why do you use a custom logging table instead of the sysdtspackagelog table ??

     

    --------------------
    Colt 45 - the original point and click interface

  • sometimes the executor doesn't have writes to anything other than logging database and the source/destination data sources.

  • I thought that's what stored procedures were for

     

    --------------------
    Colt 45 - the original point and click interface

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply