all groups > sql server dts > june 2004 >
You're in the

sql server dts

group:

DTS Workflow Question


DTS Workflow Question Kirk
6/30/2004 12:09:02 PM
sql server dts: I am using SQL Server 2000 and I am writing a DTS package that loops through a recordset and calls another package which does some work based upon passed values. It works and loops great unless the called package fails (which it can since it is connecting to an external server). What I want to do is this:

If the called package fails then run the Execute SQL task which writes the failure to a table and on completion of that then go to the ActiveX Script handling the loop routine.
If the called package succeeds then go to the ActiveX Script handling the loop routine.

What is happenning is that if it succeeds then neither workflow is continued (which means no loop) and it the execute package call fails then it stops completely.

Re: DTS Workflow Question Darren Green
7/1/2004 11:33:14 AM
In message <F76A784B-EDB7-4207-8E6D-7945662860D3@microsoft.com>, Kirk
<Kirk@discussions.microsoft.com> writes
[quoted text, click to view]

You cannot have two constraints leading to the same task, and the use
AND logic.

You could duplicate the ActiveX Script to restart the loop, and add it
again after the Exec SQL Task.

or

Use the skip task concept. ExecPkg -> ExecSQLErrorLog-> ActXLoopEnd

Using the three tasks in the order above and ensuring the first
constraint in On Complete, then you could use Workflow Script on the
Exec SQL Task to skip it when the Exec Pkg Task result was OK.

Personally I would duplicate the ActiveX Script Task as it will just be
a lot simpler to maintain.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button