Finding if a DTS Package is running

Finding if a DTS Package is running

February 20th, 2006 // 5:37 pm @

I was stuck at finding a solution to if a DTS Package is executing or not. It could have been started with the scheduler, or started manually. The only solution to this problem which I could come up with without any code changes to the package itself, was to enable Logging to SQL Server, and then checking the state of the package in the syspackagelog table by the following query



SELECT TOP 1 endtime FROM msdb.sysdtspackagelog WHERE
name = ‘Your Package Name’ ORDER BY starttime DESC


If it returns a date, then the package is not running, and if it returns NULL, then the package is currently in executing stage.


Category : SQL Server

Leave a Reply

Latest Posts

Testimonials

"Amar clearly has a thorough knowledge of Sharepoint, this knowledge, coupled with his professionalism and dedication made him a tremendous asset to the project. He was the key contributor to the later stages of the project delivery effort (the really difficult bit, long hours and hard work that puts huge demands on people), and I can state categorically that without his focussed dedication and hard work we would not have been able to meet the timescales imposed upon the project."

Tim Ellis , Sharepoint Project Manager , Royal Bank of Scotland

Subscribe Now