June 2, 2005 at 11:53 am
Hello All
Can someone tell me how to find the date a DTS package was last executed? I am trying to track down something that is calling dtsrun at a strange time. I have checked all jobs that call DTS packages and nothing is scheduled at that time, but there is one that gets called from a service that I can't tell when it was last run.
Any help would be appreciated
Thanks
Erich
June 2, 2005 at 12:01 pm
This should help you :
Select * from msdb.dbo.SysJobHistory where job_id = '42ADD00B-46AB-4EF5-AD59-DE476FA638D2' order by run_date desc, run_time desc
June 2, 2005 at 12:22 pm
Thanks for the help.
I ran what you posted and it returned no results. Am I missing something?
-Erich
June 2, 2005 at 12:23 pm
If it is being run interactively (and not by a scheduled SQL Server Agent job) the only way to determine when it is being run is to enable package logging (inside the DTS pakage, go to Package Properties, Logging, and enable package logging). That way it will log the execution (and status of all of the steps) whenever the package is run.
June 2, 2005 at 12:54 pm
For my query to work you need to change this '42ADD00B-46AB-4EF5-AD59-DE476FA638D2' to your package id.
June 2, 2005 at 12:56 pm
Thanks,
I realized after I posted that is probably what you meant. But by then it was already up in lights.
Thanks Again
Erich
June 2, 2005 at 12:57 pm
If it wasn't run by a scheduled job, it isn't going to have an entry in SysJobsHistory,
"I have checked all jobs that call DTS packages and nothing is scheduled at that time, but there is one that gets called from a service that I can't tell when it was last run."
June 2, 2005 at 1:14 pm
Maybe a simplistic approach, but just to add another option to the logging method... Maybe you could add a step that logs each execution in an history table... untill you can figure this out. But I'm sure that the other logging approach offers more information in its logs.
June 3, 2005 at 6:17 am
You have 2 options :
Good Luck
HABIB.
June 3, 2005 at 9:05 am
Save the DTS package under a new name, delete the old one, and see if anybody complains. If there is someone running it manually with DTSRUNUI on the command line, you should find out quickly!
(Note: I would not actually recommend doing this...it can potentially disrupt a business process somewhere, as well as create all sorts of havoc and bad feelings among the user community. But it sure would be fun!)
June 3, 2005 at 9:08 am
Rick, best solution yet!
June 3, 2005 at 9:20 am
Another solution... have you mailed you programmers to ask 'em who as using that dts (or which application)??
If they all reply :" I don't use it", then you might use the rename option... but then again it might affect business operation so definitly a last resort.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply