June 13, 2005 at 12:59 pm
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
June 13, 2005 at 1:44 pm
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)
June 13, 2005 at 3:06 pm
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.
June 14, 2005 at 1:57 am
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
June 14, 2005 at 7:01 am
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.
June 14, 2005 at 4:54 pm
Why do you use a custom logging table instead of the sysdtspackagelog table ??
--------------------
Colt 45 - the original point and click interface
June 14, 2005 at 8:29 pm
sometimes the executor doesn't have writes to anything other than logging database and the source/destination data sources.
June 14, 2005 at 11:39 pm
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