March 30, 2007 at 2:33 am
Hi,
I'm looking at a problem where a DTS package failed and which to get exactly which step caused the problem.
I run
select stepname,datediff(mi,starttime,endtime) as minutes_taken,*
from msdb..sysdtssteplog nolock
where starttime > '29-mar-2007 18:00:00' and starttime < '30-mar-2007 10:00:00'
and stepname in ('DTSStep_DTSExecuteSQLTask_11','DTSStep_DTSActiveScriptTask_5')
order by starttime asc
and get step names like DTSStep_DTSExecuteSQLTask_11 and DTSStep_DTSActiveScriptTask_5 but would like to know how I can return the names given in the DTS package itself.
Any ideas?
Any help welcome.
Thanks in advance,
Eamon
March 30, 2007 at 11:33 am
Hi Eamon,
I'll bet the names you'd like to see are the descriptions you entered when you created the tasks. Unfortunately, those aren't stored in sysdtssteplog. Are you set on finding this information with T-SQL? I've always depended on package logging to tell me which step failed.
Greg
Greg
March 31, 2007 at 7:23 am
Cheers Greg,
thanks for that, luckily I was able to figure it out at with the logs and by counting through the steps.
thanks for this.
Eamon
March 31, 2007 at 9:02 am
It is a good practice to include error message on dts packages if you are scheduling it.
April 2, 2007 at 1:43 pm
Open up your DTS package and select the Properties/Disconnected Edit menu.
In the window that appears, expand the "Steps" section. Select one of the steps in your package. Double-click on the "Name" property. Enter the same value stored in the "Description" property.
Repeat for each step in the package, then save the package. Execute the package then run your query. The stepname will now be what you want it to be.
April 3, 2007 at 3:02 am
Erik,
that works for me
Thank you,
Eamon
April 3, 2007 at 7:11 am
Not sure if you already have this but I've fount this System Table Map a god send sometimes, it helped me when I was doing something similar.
http://www.microsoft.com/sql/prodinfo/previousversions/systables.mspx
and download
systbl_rev.zip |
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply