How to get the execution status programatically of each taskhost after a package is executed

  • In 2000 DTS, I can retrieve the execution status by using Package.steps.item(index).ExecutionStatus, but I can't find this execution status in sql 2005. Can anybody give me a hint? Thanks!

  • Unless you have logging turned on, I do not believe there is a way to interrogate a package while it is running. You would have to watch dtexec.exe or dtexecui.exe and try capture it's info messages.

    You could use (as I do) the onPreExecute event handler and log that to SQL. Gives you a clear path of where the package is running.

    Use logging. That's the reason it's there.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Thanks for your advise. The reason I don't like logging is the text file format is kind of messy. Here is a part of my package execution log. Am I able to remove the first line and all unnecessary commas and give it a neat format?

    #Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message

    PackageStart,ServerName1,NTUser1,Package1,{DDA77EC3-FA1A-48B9-9BEA-8515C0719045},{EC0E563F-2CA5-4672-B007-33620430B16D},8/15/2008 4:39:15 PM,8/15/2008 4:39:15 PM,0,0x,Beginning of package execution.

    ScriptTaskLogEntry,,,Run Package2,,,8/15/2008 4:39:24 PM,8/15/2008 4:39:24 PM,0,0x,Error in T_task1 [13]: Column "currency" cannot convert between unicode and non-unicode string data types.

    ScriptTaskLogEntry,,,Run Package2,,,8/15/2008 4:39:24 PM,8/15/2008 4:39:24 PM,0,0x,Error in DTS.Pipeline: "component "T_task1" (13)" failed validation and returned validation status "VS_ISBROKEN".

    ScriptTaskLogEntry,,,Run Package2,,,8/15/2008 4:39:24 PM,8/15/2008 4:39:24 PM,0,0x,Error in DTS.Pipeline: One or more component failed validation.

    ScriptTaskLogEntry,,,Run Package2,,,8/15/2008 4:39:24 PM,8/15/2008 4:39:24 PM,0,0x,Error in : There were errors during task validation.

    OnError,,,Run Package2,,,8/15/2008 4:39:23 PM,8/15/2008 4:39:23 PM,4,0x,The Script returned a failure result.

    PackageEnd,ServerName1,NTUser1,Package1,{DDA77EC3-FA1A-48B9-9BEA-8515C0719045},{EC0E563F-2CA5-4672-B007-33620430B16D},8/15/2008 4:39:23 PM,8/15/2008 4:39:23 PM,1,0x,End of package execution.

Viewing 3 posts - 1 through 2 (of 2 total)

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