>I have a DTS task (Task N) which has 4 precedence tasks,
>only one of which can ever execute. It seems as if DTS
>assumes an 'AND' operator between the tasks, and there is
>no 'OR' option, so Task N cannot ever execute. I have
>therefore split the package in half, and added Task N and
>all of its successors to the new package, with the plan to
>call the second package from each of the 4 precedence
>tasks. I've created an 'Execute SQL Task' and am using the
>EXEC master..xp_cmdshell 'dtsrun /S ServerName /E /N
>but the called package fails to run. I know there are no
>errors with either package, as they both run OK if I call
>them directly from DTS designer (SQL 7.0). Both packages
>are large, so I don't want to Task N and all of its
>successors to each of the four outcomes, although I have
>added them to one of the outcomes as a test, and this runs
>I hope this all makes sense? Thanks for reading it through!
>Any help would be greatly appreciated.
The most obvious reason for the problem is the potential change in
execution location and security context executing the package.
Using xp_cmdshell means the package will execute on the server, under
either the SQL Server service account for a sysadmin, or the SQL Server
Agent proxy account for a non-sysadmin.
DTS is client side so when developing on your workstation, the package
is executed under your security credentials, on your machine.
I assume you are using SQL Server 7, or else you would have used the
Execute Package Task, in which case an alternative is to use an ActiveX
Execute a package from a package
You might also find these articles on workflow interesting-
Introduction to Workflow
Skip the execution of an individual Task
Multiple Paths in Workflow
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com